diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-openembedded/meta-oe/recipes-extended | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-extended')
223 files changed, 6133 insertions, 4507 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client/boinc-AM_CONDITIONAL.patch b/external/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client/boinc-AM_CONDITIONAL.patch index ab8042f7..7c3b0325 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client/boinc-AM_CONDITIONAL.patch +++ b/external/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client/boinc-AM_CONDITIONAL.patch @@ -1,21 +1,28 @@ -Add configure check for gtk2+ and objc++ +From 7957756a3dd16498cf7a75e1fb6675a33bc7f3dc Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 3 Nov 2016 01:20:33 -0700 +Subject: [PATCH] Add configure check for gtk2+ and objc++ Signed-off-by: Khem Raj <raj.khem@gmail.com> Upstream-Status: Pending -Index: boinc-client_release-7.6-7.6.33/configure.ac -=================================================================== ---- boinc-client_release-7.6-7.6.33.orig/configure.ac -+++ boinc-client_release-7.6-7.6.33/configure.ac -@@ -64,6 +64,7 @@ m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCX +--- + configure.ac | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/configure.ac b/configure.ac +index d81d795de4..7beeb34ae2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -63,6 +63,7 @@ m4_pattern_allow([AC_PROG_OBJCXX]) + m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCXX],) dnl ------ - AC_PROG_F77 AC_PROG_CPP +AC_PROG_OBJCXX AC_PROG_MAKE_SET SAH_LINKS AC_LANG_PUSH(C) -@@ -1081,6 +1082,8 @@ AM_CONDITIONAL(ENABLE_BOINCCRYPT, [test +@@ -1068,6 +1069,8 @@ AM_CONDITIONAL(ENABLE_BOINCCRYPT, [test "x${enable_server}" = xyes || test "x${ AM_CONDITIONAL(INSTALL_HEADERS, [test "${enable_install_headers}" = yes]) AM_CONDITIONAL(HAVE_CUDA_LIB, [test "${enable_client}" = yes -a -f ./coprocs/CUDA/posix/${boinc_platform}/libcudart.so]) diff --git a/external/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client/gtk-configure.patch b/external/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client/gtk-configure.patch index 4ae8d580..e060b1a4 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client/gtk-configure.patch +++ b/external/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client/gtk-configure.patch @@ -1,13 +1,20 @@ -Check for gtk2+ only when manager is enabled +From d53e9617fb6446780478bb13907efd111f241cd1 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 3 Nov 2016 01:20:33 -0700 +Subject: [PATCH] Check for gtk2+ only when manager is enabled Signed-off-by: Khem Raj <raj.khem@gmail.com> Upstream-Status: Pending -Index: boinc-client_release-7.6-7.6.33/configure.ac -=================================================================== ---- boinc-client_release-7.6-7.6.33.orig/configure.ac -+++ boinc-client_release-7.6-7.6.33/configure.ac -@@ -1033,6 +1033,11 @@ else +--- + configure.ac | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 7beeb34ae2..35234c2762 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1018,6 +1018,11 @@ else AM_CONDITIONAL([GUI_GTK], false) fi @@ -19,7 +26,7 @@ Index: boinc-client_release-7.6-7.6.33/configure.ac dnl ---------- libNotify -------------------------------------------------- if test "${enable_manager}" = yes ; then PKG_CHECK_MODULES(LIBNOTIFY, [libnotify]) -@@ -1082,7 +1087,6 @@ AM_CONDITIONAL(ENABLE_BOINCCRYPT, [test +@@ -1069,7 +1074,6 @@ AM_CONDITIONAL(ENABLE_BOINCCRYPT, [test "x${enable_server}" = xyes || test "x${ AM_CONDITIONAL(INSTALL_HEADERS, [test "${enable_install_headers}" = yes]) AM_CONDITIONAL(HAVE_CUDA_LIB, [test "${enable_client}" = yes -a -f ./coprocs/CUDA/posix/${boinc_platform}/libcudart.so]) diff --git a/external/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client/opengl_m4_check.patch b/external/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client/opengl_m4_check.patch index 0b057eab..ad4493f0 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client/opengl_m4_check.patch +++ b/external/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client/opengl_m4_check.patch @@ -1,13 +1,22 @@ +From 4f2dd929618f149087249f3c90cc056d5080b1e4 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 3 Nov 2016 01:20:33 -0700 +Subject: [PATCH] boinc: Add recipe for boinc-client + Do not add prefix/lib to library search path let sysroot take care of that Signed-off-by: Khem Raj <raj.khem@gmail.com> Upstream-Status: Inappropriate[Cross-compile specific] -Index: boinc-client_release-7.6-7.6.33/m4/ax_check_gl.m4 -=================================================================== ---- boinc-client_release-7.6-7.6.33.orig/m4/ax_check_gl.m4 -+++ boinc-client_release-7.6-7.6.33/m4/ax_check_gl.m4 +--- + m4/ax_check_gl.m4 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/m4/ax_check_gl.m4 b/m4/ax_check_gl.m4 +index e26ce5b930..1e60c9266a 100644 +--- a/m4/ax_check_gl.m4 ++++ b/m4/ax_check_gl.m4 @@ -58,7 +58,7 @@ else else ax_try_lib="${ax_lib}" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client_7.12.bb b/external/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client_7.16.bb index e505bb4c..db90f06f 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client_7.12.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client_7.16.bb @@ -29,7 +29,7 @@ DEPENDS = "curl \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+ libnotify xcb-util libxscrnsaver', '', d)} \ nettle \ " -SRCREV = "bd12338dbd29083daa5a4b022592ca31ff68cd98" +SRCREV = "e0e033af9fca3cca84a3417ea6531ae25be73a7a" BRANCH = "client_release/7/${PV}" SRC_URI = "git://github.com/BOINC/boinc;protocol=https;branch=${BRANCH} \ file://boinc-AM_CONDITIONAL.patch \ @@ -37,7 +37,7 @@ SRC_URI = "git://github.com/BOINC/boinc;protocol=https;branch=${BRANCH} \ file://gtk-configure.patch \ " -inherit gettext autotools pkgconfig distro_features_check systemd +inherit gettext autotools pkgconfig features_check systemd REQUIRED_DISTRO_FEATURES += "opengl" @@ -73,12 +73,16 @@ do_compile_prepend () { sed -i -e 's|^sys_lib_dlsearch_path_spec=.*|sys_lib_dlsearch_path_spec=""|g' ${B}/${TARGET_SYS}-libtool sed -i -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${B}/${TARGET_SYS}-libtool } + do_install_append() { - if [ -e ${D}${libdir}/systemd/system/boinc-client.service ]; then - install -D -m 0644 \ - ${D}${libdir}/systemd/system/boinc-client.service \ + if [ -e ${D}${nonarch_libdir}/systemd/system/boinc-client.service ]; then + install -d ${D}${systemd_system_unitdir} + mv \ + ${D}${nonarch_libdir}/systemd/system/boinc-client.service \ ${D}${systemd_system_unitdir}/boinc-client.service - rm -rf ${D}${libdir}/systemd + rmdir --ignore-fail-on-non-empty ${D}${nonarch_libdir}/systemd/system \ + ${D}${nonarch_libdir}/systemd \ + ${D}${nonarch_libdir} fi } diff --git a/external/meta-openembedded/meta-oe/recipes-extended/brotli/brotli_1.0.7.bb b/external/meta-openembedded/meta-oe/recipes-extended/brotli/brotli_1.0.7.bb index b4d4773e..70dbcaff 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/brotli/brotli_1.0.7.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/brotli/brotli_1.0.7.bb @@ -12,3 +12,11 @@ SRCREV= "d6d98957ca8ccb1ef45922e978bb10efca0ea541" S = "${WORKDIR}/git" inherit cmake lib_package + +do_install_append () { + for lib in $(ls ${D}${libdir}/*-static.a); do + mv -v "${lib}" "$(echo ${lib} | sed s/-static//)" + done +} + +BBCLASSEXTEND = "native" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch b/external/meta-openembedded/meta-oe/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch index 3bc0db96..c7830ed9 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch +++ b/external/meta-openembedded/meta-oe/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch @@ -10,16 +10,21 @@ Upstream-Status: Inappropriate [OE Specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +Update for 20190617. +Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> + +Update for 20191103. +Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> --- aclocal.m4 | 1 - - configure | 140 ------------------------------------------------------------- - 2 files changed, 141 deletions(-) + configure | 259 ------------------------------------------------------------- + 2 files changed, 260 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 -index 0d14f26..0cefa08 100644 +index b90cfe6..413ea9c 100644 --- a/aclocal.m4 +++ b/aclocal.m4 -@@ -1038,7 +1038,6 @@ CF_GCC_VERSION +@@ -1232,7 +1232,6 @@ CF_GCC_VERSION CF_ACVERSION_CHECK(2.52, [AC_PROG_CC_STDC], [CF_ANSI_CC_REQD]) @@ -28,21 +33,140 @@ index 0d14f26..0cefa08 100644 dnl --------------------------------------------------------------------------- dnl CF_PROG_GROFF version: 3 updated: 2018/01/07 13:16:19 diff --git a/configure b/configure -index d27ae31..077c648 100755 +index ec77bba..234f271 100755 --- a/configure +++ b/configure -@@ -1946,146 +1946,6 @@ esac +@@ -2059,265 +2059,6 @@ esac # This should have been defined by AC_PROG_CC : ${CC:=cc} --echo "$as_me:1949: checking \$CC variable" >&5 +-echo "$as_me:2062: checking \$CFLAGS variable" >&5 +-echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6 +-case "x$CFLAGS" in +-(*-[IUD]*) +- echo "$as_me:2066: result: broken" >&5 +-echo "${ECHO_T}broken" >&6 +- { echo "$as_me:2068: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5 +-echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;} +- cf_flags="$CFLAGS" +- CFLAGS= +- for cf_arg in $cf_flags +- do +- +-cf_fix_cppflags=no +-cf_new_cflags= +-cf_new_cppflags= +-cf_new_extra_cppflags= +- +-for cf_add_cflags in $cf_arg +-do +-case $cf_fix_cppflags in +-(no) +- case $cf_add_cflags in +- (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) +- case $cf_add_cflags in +- (-D*) +- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` +- +- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ +- && test -z "${cf_tst_cflags}" \ +- && cf_fix_cppflags=yes +- +- if test $cf_fix_cppflags = yes ; then +- +- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " +- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" +- +- continue +- elif test "${cf_tst_cflags}" = "\"'" ; then +- +- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " +- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" +- +- continue +- fi +- ;; +- esac +- case "$CPPFLAGS" in +- (*$cf_add_cflags) +- ;; +- (*) +- case $cf_add_cflags in +- (-D*) +- cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` +- +-CPPFLAGS=`echo "$CPPFLAGS" | \ +- sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ +- -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` +- +- ;; +- esac +- +- test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " +- cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" +- +- ;; +- esac +- ;; +- (*) +- +- test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " +- cf_new_cflags="${cf_new_cflags}$cf_add_cflags" +- +- ;; +- esac +- ;; +-(yes) +- +- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " +- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" +- +- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` +- +- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ +- && test -z "${cf_tst_cflags}" \ +- && cf_fix_cppflags=no +- ;; +-esac +-done +- +-if test -n "$cf_new_cflags" ; then +- +- test -n "$CFLAGS" && CFLAGS="$CFLAGS " +- CFLAGS="${CFLAGS}$cf_new_cflags" +- +-fi +- +-if test -n "$cf_new_cppflags" ; then +- +- test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " +- CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" +- +-fi +- +-if test -n "$cf_new_extra_cppflags" ; then +- +- test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " +- EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" +- +-fi +- +- done +- ;; +-(*) +- echo "$as_me:2176: result: ok" >&5 +-echo "${ECHO_T}ok" >&6 +- ;; +-esac +- +-echo "$as_me:2181: checking \$CC variable" >&5 -echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6 -case "$CC" in -(*[\ \ ]-*) -- echo "$as_me:1953: result: broken" >&5 +- echo "$as_me:2185: result: broken" >&5 -echo "${ECHO_T}broken" >&6 -- { echo "$as_me:1955: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5 --echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;} +- { echo "$as_me:2187: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5 +-echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;} - # humor him... - cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'` - cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'` @@ -158,24 +282,24 @@ index d27ae31..077c648 100755 - done - test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6 - --echo "${as_me:-configure}:2072: testing resulting CC: '$CC' ..." 1>&5 +-echo "${as_me:-configure}:2304: testing resulting CC: '$CC' ..." 1>&5 - - test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6 - --echo "${as_me:-configure}:2076: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5 +-echo "${as_me:-configure}:2308: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5 - - test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6 - --echo "${as_me:-configure}:2080: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5 +-echo "${as_me:-configure}:2312: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5 - - ;; -(*) -- echo "$as_me:2084: result: ok" >&5 +- echo "$as_me:2316: result: ok" >&5 -echo "${ECHO_T}ok" >&6 - ;; -esac - - echo "$as_me:2089: checking whether ${MAKE-make} sets \${MAKE}" >&5 + echo "$as_me:2321: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` -- diff --git a/external/meta-openembedded/meta-oe/recipes-extended/byacc/byacc_20180510.bb b/external/meta-openembedded/meta-oe/recipes-extended/byacc/byacc_20200330.bb index f30c4264..975311c9 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/byacc/byacc_20180510.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/byacc/byacc_20200330.bb @@ -4,9 +4,8 @@ # Setting to PD as this is what the upstream has it as. LICENSE = "PD" -LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=8b2933503c0443e041d3168dc0c65640" +LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=262857ec5923f073fa06a1f1812225ea" require byacc.inc -SRC_URI[md5sum] = "97fdc0745e0ff0cef5c09d57d0c6752d" -SRC_URI[sha256sum] = "d0940dbffbc7e9c9dd4985c25349c390beede84ae1d9fe86b71c0aa659a6d693" - +SRC_URI[md5sum] = "decf6e6b82ea2efae6bbad32d7777da8" +SRC_URI[sha256sum] = "e099e2dd8a684d739ac6b9a0e43d468314a5bc34fd21466502d120b18df51fb0" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles/python3.patch b/external/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles/python3.patch new file mode 100644 index 00000000..a6f67012 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles/python3.patch @@ -0,0 +1,16 @@ +--- a/modules/packages/apt_get ++++ b/modules/packages/apt_get +@@ -1,4 +1,4 @@ +-#!/var/cfengine/bin/python ++#!/var/cfengine/bin/python3 + + import sys + import os +--- a/modules/packages/apt_get.in ++++ b/modules/packages/apt_get.in +@@ -1,4 +1,4 @@ +-#!@bindir@/python ++#!@bindir@/python3 + + import sys + import os diff --git a/external/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.12.0.bb b/external/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.15.0.bb index dda6af9c..35ac8559 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.12.0.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.15.0.bb @@ -20,10 +20,11 @@ HOMEPAGE = "http://cfengine.com" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=9f76426f9ef8c6f6739fadd21d817a4f" -SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BP}.tar.gz" - -SRC_URI[md5sum] = "d59bd8c95620da816c382f749d425860" -SRC_URI[sha256sum] = "1c50e3d8c702097e13a21258626d936d6ff2e6492e893dfe286ff0d6204d7a65" +SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BP}.tar.gz \ + file://python3.patch \ + " +SRC_URI[md5sum] = "6d456fdd9bd24ff6617eeaa05efae602" +SRC_URI[sha256sum] = "4a071c0c4ba7df9bad93144cff5fbc0566e5172afd66201072e3193b76c55a38" inherit autotools @@ -31,6 +32,10 @@ export EXPLICIT_VERSION="${PV}" EXTRA_OECONF = "--prefix=${datadir}/cfengine" +do_install_append() { + rm -rf ${D}${datadir}/cfengine/modules/packages/zypper ${D}${datadir}/cfengine/modules/packages/yum +} + FILES_${PN} = "${datadir}/cfengine" -RDEPENDS_${PN} += "python-core" +RDEPENDS_${PN} += "python3-core" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine_3.12.0.bb b/external/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine_3.15.0.bb index 9d0123d8..2d146bf8 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine_3.12.0.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine_3.15.0.bb @@ -11,18 +11,17 @@ its lifecycle. CFEngine takes systems from Build to Deploy, Manage and Audit." HOMEPAGE = "http://cfengine.com" LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://LICENSE;md5=f8b34828ab373d6b1bb4b0fc60a78494" +LIC_FILES_CHKSUM = "file://LICENSE;md5=233aa25e53983237cf0bd4c238af255f" -DEPENDS = "attr tokyocabinet" +DEPENDS = "attr tokyocabinet bison-native" SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BP}.tar.gz \ file://set-path-of-default-config-file.patch \ " +SRC_URI[md5sum] = "d4dabfa46d8afa151be5610f184354e7" +SRC_URI[sha256sum] = "fa53e137f850eb268a8e7ae4578b5db5dc383656341f5053dc1a353ed0288265" -SRC_URI[md5sum] = "33ef12260db4b430352229f37f7cb0e5" -SRC_URI[sha256sum] = "d71ba98a272390c6fa8bc20e8ea27f0050a0a72a3e6b206a4762b4646be332ec" - -inherit autotools systemd +inherit autotools-brokensep systemd export EXPLICIT_VERSION="${PV}" @@ -67,6 +66,7 @@ EOF install -m 0755 -D ${D}${sysconfdir}/init.d/cfengine3 ${D}${datadir}/${BPN}/cfengine3 sed -i -e 's#/etc/init.d#${datadir}/${BPN}#' ${D}${systemd_system_unitdir}/*.service fi + rm -rf ${D}${datadir}/cfengine/modules/packages/zypper } RDEPENDS_${PN} += "${BPN}-masterfiles" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-Add-PYTHON_ABI-suffix-to-the-python-library-name.patch b/external/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-Add-PYTHON_ABI-suffix-to-the-python-library-name.patch index b2a149b0..fa029da2 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-Add-PYTHON_ABI-suffix-to-the-python-library-name.patch +++ b/external/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-Add-PYTHON_ABI-suffix-to-the-python-library-name.patch @@ -9,19 +9,14 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> swig/python/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/swig/python/CMakeLists.txt b/swig/python/CMakeLists.txt -index 128798b..391cef7 100644 --- a/swig/python/CMakeLists.txt +++ b/swig/python/CMakeLists.txt -@@ -49,7 +49,7 @@ ADD_DEFINITIONS(-DCMPI_PLATFORM_LINUX_GENERIC_GNU -DCMPI_VERSION=200) +@@ -49,7 +49,7 @@ ADD_DEFINITIONS(-DCMPI_PLATFORM_LINUX_GE SET( NAME pyCmpiProvider ) ADD_LIBRARY( ${NAME} SHARED ${SWIG_OUTPUT}) #TARGET_LINK_LIBRARIES( ${NAME} ${PYTHON_LIBRARIES} ) -TARGET_LINK_LIBRARIES( ${NAME} python${PYTHON_MAJOR_VERSION}.${PYTHON_MINOR_VERSION} ) -+TARGET_LINK_LIBRARIES( ${NAME} python${PYTHON_MAJOR_VERSION}.${PYTHON_MINOR_VERSION}m ) ++TARGET_LINK_LIBRARIES( ${NAME} python${PYTHON_MAJOR_VERSION}.${PYTHON_MINOR_VERSION}${PYTHON_ABI} ) TARGET_LINK_LIBRARIES( ${NAME} pthread ) TARGET_LINK_LIBRARIES( ${NAME} dl ) TARGET_LINK_LIBRARIES( ${NAME} util ) --- -2.8.1 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_1.0.1.bb b/external/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_1.0.1.bb index 987c09fe..6c71d534 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_1.0.1.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_1.0.1.bb @@ -1,7 +1,7 @@ SUMMARY = "Adapter to write and run CMPI-type CIM providers" DESCRIPTION = "CMPI-compliant provider interface for various languages via SWIG" HOMEPAGE = "http://github.com/kkaempf/cmpi-bindings" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=b19ee058d2d5f69af45da98051d91064" SECTION = "Development/Libraries" DEPENDS = "swig-native python3 sblim-cmpi-devel" @@ -22,7 +22,9 @@ S = "${WORKDIR}/git" inherit cmake python3native EXTRA_OECMAKE = "-DLIB='${baselib}' \ - -DPYTHON_INCLUDE_PATH=${STAGING_INCDIR}/python${PYTHON_BASEVERSION}" + -DPYTHON_INCLUDE_PATH=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \ + -DPYTHON_ABI=${PYTHON_ABI} \ + " # With Ninja it fails with: # ninja: error: build.ninja:282: bad $-escape (literal $ must be written as $$) diff --git a/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h-on-glibc-based-systems.patch b/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h-on-glibc-based-systems.patch new file mode 100644 index 00000000..7948788f --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h-on-glibc-based-systems.patch @@ -0,0 +1,53 @@ +From 090a17ca338a9311d682ecc5933b32bff67cf07f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 27 Jul 2019 14:20:14 -0700 +Subject: [PATCH] Remove including sys/sysctl.h on glibc based systems + +Glibc 2.30 has added deprecation notice and collectd detects it as +warning [1] + +Fixes +sys/sysctl.h:21:2: error: "The <sys/sysctl.h> header is deprecated and +will be removed." [-Werror,-W#warnings] + +[1] +https://sourceware.org/git/?p=glibc.git;a=commit;h=744e829637162bb7d5029632aacf341c64b86990 + +Upstream-Status: Submitted +[https://github.com/collectd/collectd/pull/3234] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/processes.c | 2 +- + src/uptime.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/processes.c b/src/processes.c +index f83913a..9f71511 100644 +--- a/src/processes.c ++++ b/src/processes.c +@@ -87,7 +87,7 @@ + #if HAVE_MACH_VM_PROT_H + #include <mach/vm_prot.h> + #endif +-#if HAVE_SYS_SYSCTL_H ++#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__) + #include <sys/sysctl.h> + #endif + /* #endif HAVE_THREAD_INFO */ +diff --git a/src/uptime.c b/src/uptime.c +index 0892bda..4b15150 100644 +--- a/src/uptime.c ++++ b/src/uptime.c +@@ -33,7 +33,7 @@ + */ + /* #endif HAVE_LIBKSTAT */ + +-#elif HAVE_SYS_SYSCTL_H ++#elif defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__) + #include <sys/sysctl.h> + /* Using sysctl interface to retrieve the boot time on *BSD / Darwin / OS X + * systems */ + +-- +2.17.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0001-conditionally-check-libvirt.patch b/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0001-conditionally-check-libvirt.patch deleted file mode 100644 index 5ee75cb4..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0001-conditionally-check-libvirt.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 385bf1c2ec57942e17ee529e57eef0dcd99904e6 Mon Sep 17 00:00:00 2001 -From: Roy Li <rongqing.li@windriver.com> -Date: Tue, 1 Sep 2015 17:00:33 +0800 -Subject: [PATCH] [PATCH] conditionally check libvirt - -Upstream-Statue: Pending - -check if libvirt is available only when a user wants to use libvirt - -Signed-off-by: Roy Li <rongqing.li@windriver.com> - ---- - configure.ac | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 101d6f9f..a7eca97d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -5758,11 +5758,14 @@ else - with_libxml2="no (pkg-config doesn't know libxml-2.0)" - fi - --$PKG_CONFIG --exists libvirt 2>/dev/null --if test $? = 0; then -- with_libvirt="yes" --else -- with_libvirt="no (pkg-config doesn't know libvirt)" -+if test "x$enable_libvirt" = "xyes"; then -+ $PKG_CONFIG --exists libvirt 2>/dev/null -+ if test "$?" = "0" -+ then -+ with_libvirt="yes" -+ else -+ with_libvirt="no (pkg-config doesn't know libvirt)" -+ fi - fi - - if test "x$with_libxml2" = "xyes"; then diff --git a/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch b/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch index d2c72680..8d31e12f 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch +++ b/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch @@ -23,9 +23,9 @@ diff --git a/configure.ac b/configure.ac index a7eca97d..560eb988 100644 --- a/configure.ac +++ b/configure.ac -@@ -6794,6 +6794,7 @@ if test "x$enable_werror" != "xno"; then - AM_CFLAGS="$AM_CFLAGS -Werror" - AM_CXXFLAGS="$AM_CXXFLAGS -Werror" +@@ -7101,6 +7101,7 @@ if test "x$GCC" = "xyes"; then + AM_CXXFLAGS="$AM_CXXFLAGS -Werror" + fi fi +AX_CHECK_COMPILE_FLAG([-Werror -Werror=format-truncation],[AM_CFLAGS="$AM_CFLAGS -Wno-error=format-truncation" AM_CXXFLAGS="$AM_CXXFLAGS -Wno-error=format-truncation"]) diff --git a/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0001-fix-to-build-with-glibc-2.25.patch b/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0001-fix-to-build-with-glibc-2.25.patch index be942e5e..1e140f97 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0001-fix-to-build-with-glibc-2.25.patch +++ b/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0001-fix-to-build-with-glibc-2.25.patch @@ -11,8 +11,8 @@ diff --git a/src/md.c b/src/md.c index 3725f9a..202225b 100644 --- a/src/md.c +++ b/src/md.c -@@ -25,6 +25,7 @@ - #include "utils_ignorelist.h" +@@ -26,6 +26,7 @@ + #include "utils/ignorelist/ignorelist.h" #include <sys/ioctl.h> +#include <sys/sysmacros.h> diff --git a/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0005-Disable-new-gcc8-warnings.patch b/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0005-Disable-new-gcc8-warnings.patch index b12690b3..13510cde 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0005-Disable-new-gcc8-warnings.patch +++ b/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0005-Disable-new-gcc8-warnings.patch @@ -1,4 +1,4 @@ -From d65e48b68076d5b304e6d865967003ae1fea0e6c Mon Sep 17 00:00:00 2001 +From f82f8faf9942f51e9c3c773b56574652695bef5a Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 9 May 2018 21:45:38 -0700 Subject: [PATCH] Disable new gcc8 warnings @@ -7,17 +7,17 @@ GCC seems to be not able to detect the checks for size are already in place Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- -Upstream-Status: Submitted [https://github.com/collectd/collectd/pull/2768] src/libcollectdclient/network_parse.c | 7 +++++++ src/write_sensu.c | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/libcollectdclient/network_parse.c b/src/libcollectdclient/network_parse.c -index 2365ab0a..79e6ed96 100644 +index aa753ce..fef43a9 100644 --- a/src/libcollectdclient/network_parse.c +++ b/src/libcollectdclient/network_parse.c -@@ -163,6 +163,11 @@ static int parse_int(void *payload, size_t payload_size, uint64_t *out) { +@@ -148,6 +148,11 @@ static int parse_int(void *payload, size_t payload_size, uint64_t *out) { return 0; } @@ -29,7 +29,7 @@ index 2365ab0a..79e6ed96 100644 static int parse_string(void *payload, size_t payload_size, char *out, size_t out_size) { char *in = payload; -@@ -175,6 +180,8 @@ static int parse_string(void *payload, size_t payload_size, char *out, +@@ -160,6 +165,8 @@ static int parse_string(void *payload, size_t payload_size, char *out, return 0; } @@ -39,22 +39,22 @@ index 2365ab0a..79e6ed96 100644 lcc_value_list_t *state) { char buf[LCC_NAME_LEN]; diff --git a/src/write_sensu.c b/src/write_sensu.c -index ce23e654..63e1f599 100644 +index bd7a56d..6cb59d5 100644 --- a/src/write_sensu.c +++ b/src/write_sensu.c -@@ -569,6 +569,11 @@ static char *sensu_value_to_json(struct sensu_host const *host, /* {{{ */ +@@ -570,6 +570,11 @@ static char *sensu_value_to_json(struct sensu_host const *host, /* {{{ */ return ret_str; } /* }}} char *sensu_value_to_json */ +#pragma GCC diagnostic push -+#if __GNUC__ == 8 ++#if __GNUC__ > 7 +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#pragma GCC diagnostic ignored "-Wstringop-truncation" +#endif /* * Uses replace_str2() implementation from * http://creativeandcritical.net/str-replace-c/ -@@ -631,6 +636,8 @@ static char *replace_str(const char *str, const char *old, /* {{{ */ +@@ -632,6 +637,8 @@ static char *replace_str(const char *str, const char *old, /* {{{ */ return ret; } /* }}} char *replace_str */ diff --git a/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0006-libcollectdclient-Fix-string-overflow-errors.patch b/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0006-libcollectdclient-Fix-string-overflow-errors.patch new file mode 100644 index 00000000..3ed652f7 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd/0006-libcollectdclient-Fix-string-overflow-errors.patch @@ -0,0 +1,31 @@ +From 98719ea7f717750c790a1f9384ea8d0117e7f52d Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 17 Dec 2018 18:15:05 -0800 +Subject: [PATCH] libcollectdclient: Fix string overflow errors + +Ensure that string has a space for ending null char + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/libcollectdclient/network_parse.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/libcollectdclient/network_parse.c b/src/libcollectdclient/network_parse.c +index fef43a9..6d65266 100644 +--- a/src/libcollectdclient/network_parse.c ++++ b/src/libcollectdclient/network_parse.c +@@ -169,9 +169,9 @@ static int parse_string(void *payload, size_t payload_size, char *out, + + static int parse_identifier(uint16_t type, void *payload, size_t payload_size, + lcc_value_list_t *state) { +- char buf[LCC_NAME_LEN]; +- +- if (parse_string(payload, payload_size, buf, sizeof(buf)) != 0) ++ char buf[LCC_NAME_LEN+1]; ++ buf[LCC_NAME_LEN] = '\0'; ++ if (parse_string(payload, payload_size, buf, LCC_NAME_LEN) != 0) + return EINVAL; + + switch (type) { diff --git a/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd_5.8.0.bb b/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd_5.11.0.bb index df9fa233..a70e82e0 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd_5.8.0.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/collectd/collectd_5.11.0.bb @@ -9,15 +9,16 @@ SRC_URI = "http://collectd.org/files/collectd-${PV}.tar.bz2 \ file://collectd.init \ file://collectd.service \ file://no-gcrypt-badpath.patch \ - file://0001-conditionally-check-libvirt.patch \ file://0001-fix-to-build-with-glibc-2.25.patch \ file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ file://0005-Disable-new-gcc8-warnings.patch \ + file://0006-libcollectdclient-Fix-string-overflow-errors.patch \ + file://0001-Remove-including-sys-sysctl.h-on-glibc-based-systems.patch \ " -SRC_URI[md5sum] = "a841159323624f18bf03198e9f5aa364" -SRC_URI[sha256sum] = "b06ff476bbf05533cb97ae6749262cc3c76c9969f032bd8496690084ddeb15c9" +SRC_URI[md5sum] = "13b1c946f6684abe453e24b5cd80ec45" +SRC_URI[sha256sum] = "37b10a806e34aa8570c1cafa6006c604796fae13cc2e1b3e630d33dcba9e5db2" -inherit autotools pythonnative update-rc.d pkgconfig systemd +inherit autotools python3native update-rc.d pkgconfig systemd SYSTEMD_SERVICE_${PN} = "collectd.service" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/ddrescue/ddrescue_1.22.bb b/external/meta-openembedded/meta-oe/recipes-extended/ddrescue/ddrescue_1.25.bb index 2df7db9e..cf24354f 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/ddrescue/ddrescue_1.22.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/ddrescue/ddrescue_1.25.bb @@ -10,8 +10,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=76d6e300ffd8fb9d18bd9b136a9bba13 \ file://main_common.cc;beginline=5;endline=16;md5=3ec288b2676528cd2b069364e313016f" SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.lz" -SRC_URI[md5sum] = "49c845ed89d25b534842e40366154cb4" -SRC_URI[sha256sum] = "09857b2e8074813ac19da5d262890f722e5f7900e521a4c60354cef95eea10a7" +SRC_URI[md5sum] = "99fd7a28bf9953d88534c7ee9ab5bd2a" +SRC_URI[sha256sum] = "ce538ebd26a09f45da67d3ad3f7431932428231ceec7a2d255f716fa231a1063" # This isn't already added by base.bbclass do_unpack[depends] += "lzip-native:do_populate_sysroot" @@ -42,4 +42,3 @@ do_install () { rm -f ${D}${infodir}/dir fi } - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20180621.bb b/external/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20190808.bb index e9879594..a1acfcd0 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20180621.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/dialog/dialog_1.3-20190808.bb @@ -10,8 +10,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" SRC_URI = "ftp://ftp.invisible-island.net/${BPN}/${BP}.tgz \ " -SRC_URI[md5sum] = "1dba09cf45ac4ba40b3cb4a3f1d694b2" -SRC_URI[sha256sum] = "4a4859e2b22d24e46c1a529b5a5605b95503aa04da4432f7bbd713e3e867587a" +SRC_URI[md5sum] = "f48b597251a26c522002736652e0300c" +SRC_URI[sha256sum] = "886e12f2cf3df36cde65f32f6ae52bc598eb2599a611b1d8ce5dfdea599e47e2" # hardcoded here for use in dialog-static recipe S = "${WORKDIR}/dialog-${PV}" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0002-Don-t-execute-processes-as-a-specific-user.patch b/external/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0002-Don-t-execute-processes-as-a-specific-user.patch new file mode 100644 index 00000000..181be25c --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0002-Don-t-execute-processes-as-a-specific-user.patch @@ -0,0 +1,94 @@ +From bcca4c99394ba422d03a5e76f2a0023ef248824a Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan <andrei.gherzan@windriver.com> +Date: Tue, 18 Nov 2014 15:47:22 +0100 +Subject: [PATCH 2/4] Don't execute processes as a specific user. + +Upstream-Status: Inappropriate [Configuration Specific] +Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com> +--- + systemd/dlt-adaptor-udp.service.cmake | 1 - + systemd/dlt-dbus.service.cmake | 1 - + systemd/dlt-example-user.service.cmake | 1 - + systemd/dlt-receive.service.cmake | 1 - + systemd/dlt-system.service.cmake | 1 - + systemd/dlt.service.cmake | 1 - + 6 files changed, 6 deletions(-) + +diff --git a/systemd/dlt-adaptor-udp.service.cmake b/systemd/dlt-adaptor-udp.service.cmake +index 8dac1f2..ecf9f9e 100644 +--- a/systemd/dlt-adaptor-udp.service.cmake ++++ b/systemd/dlt-adaptor-udp.service.cmake +@@ -21,9 +21,8 @@ Wants=dlt.service + + [Service] + Type=simple +-User=@DLT_USER@ + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-adaptor-udp -a @DLT_ADAPTOR_UDP_APPID@ -c @DLT_ADAPTOR_UDP_CTID@ -p @DLT_ADAPTOR_UDP_PORT@ + LimitCORE=infinity + + [Install] +-WantedBy=multi-user.target +\ No newline at end of file ++WantedBy=multi-user.target +diff --git a/systemd/dlt-dbus.service.cmake b/systemd/dlt-dbus.service.cmake +index 9baf3e9..74a7eac 100644 +--- a/systemd/dlt-dbus.service.cmake ++++ b/systemd/dlt-dbus.service.cmake +@@ -20,7 +20,6 @@ Wants=dlt.service + + [Service] + Type=simple +-User=@DLT_USER@ + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-dbus + WatchdogSec=@DLT_WatchdogSec@ + NotifyAccess=main +diff --git a/systemd/dlt-example-user.service.cmake b/systemd/dlt-example-user.service.cmake +index b665742..35009b0 100644 +--- a/systemd/dlt-example-user.service.cmake ++++ b/systemd/dlt-example-user.service.cmake +@@ -21,6 +21,5 @@ Wants=dlt.service + + [Service] + Type=simple +-User=@DLT_USER@ + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-example-user "Hallo from GENIVI DLT example user application" +-LimitCORE=infinity +\ No newline at end of file ++LimitCORE=infinity +diff --git a/systemd/dlt-receive.service.cmake b/systemd/dlt-receive.service.cmake +index c07d447..8f88f00 100644 +--- a/systemd/dlt-receive.service.cmake ++++ b/systemd/dlt-receive.service.cmake +@@ -22,6 +22,5 @@ Wants=dlt.service + + [Service] + Type=simple +-User=@DLT_USER@ + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-receive -o /tmp/dlt_receive_log.dlt localhost +-LimitCORE=infinity +\ No newline at end of file ++LimitCORE=infinity +diff --git a/systemd/dlt-system.service.cmake b/systemd/dlt-system.service.cmake +index 0e91f42..1a5b913 100755 +--- a/systemd/dlt-system.service.cmake ++++ b/systemd/dlt-system.service.cmake +@@ -22,7 +22,6 @@ Wants=dlt.service + + [Service] + Type=simple +-User=@DLT_USER@ + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-system + WatchdogSec=@DLT_WatchdogSec@ + NotifyAccess=main +diff --git a/systemd/dlt.service.cmake b/systemd/dlt.service.cmake +index 0b3ee2c..e4753a2 100755 +--- a/systemd/dlt.service.cmake ++++ b/systemd/dlt.service.cmake +@@ -21,7 +21,6 @@ Documentation=man:dlt-daemon(1) man:dlt.conf(5) + + [Service] + Type=simple +-User=@DLT_USER@ + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-daemon + WatchdogSec=@DLT_WatchdogSec@ + NotifyAccess=main diff --git a/external/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0004-Modify-systemd-config-directory.patch b/external/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0004-Modify-systemd-config-directory.patch new file mode 100644 index 00000000..ce028c0c --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0004-Modify-systemd-config-directory.patch @@ -0,0 +1,24 @@ +From 9a5e655cf57301008cd61d53c8a410a7f397e650 Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan <andrei.gherzan@windriver.com> +Date: Tue, 18 Nov 2014 15:51:30 +0100 +Subject: [PATCH 4/4] Modify systemd config directory + +Upstream-Status: Inappropriate [Configuration Specific] +Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com> +--- + systemd/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e6b44a2..0e885bf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -201,7 +201,7 @@ if(WITH_SYSTEMD OR WITH_SYSTEMD_WATCHDOG OR WITH_SYSTEMD_JOURNAL) + + set(systemd_SRCS ${PROJECT_SOURCE_DIR}/systemd/3rdparty/sd-daemon.c) + +- set(SYSTEMD_UNITDIR "${CMAKE_INSTALL_PREFIX}/lib/systemd/system" CACHE PATH ++ set(SYSTEMD_UNITDIR "/lib/systemd/system" CACHE PATH + "Set directory to install systemd unit files") + + add_subdirectory(systemd) diff --git a/external/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/204.patch b/external/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/204.patch new file mode 100644 index 00000000..f0fc0bcb --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/204.patch @@ -0,0 +1,148 @@ +Upstream-Status: Submitted [https://github.com/GENIVI/dlt-daemon/pull/204] +From 92830aff6e91041f574753d78da758c62981d9a4 Mon Sep 17 00:00:00 2001 +From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> +Date: Sat, 25 Jan 2020 09:08:07 +0100 +Subject: [PATCH 1/3] dlt_user.h: fix build when musl is the libc + implementation, by adding a missing include for pthread_t reference: + +see https://errors.yoctoproject.org/Errors/Details/308000/ for details + +Thanks Khem Raj <raj.khem@gmail.com> for the report + +Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> +Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org> +--- + include/dlt/dlt_user.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/dlt/dlt_user.h b/include/dlt/dlt_user.h +index 69cb854..766d349 100644 +--- a/include/dlt/dlt_user.h ++++ b/include/dlt/dlt_user.h +@@ -74,6 +74,7 @@ + \{ + */ + # include <mqueue.h> ++# include <pthread.h> + + # if !defined (__WIN32__) + # include <semaphore.h> + +From 5f67aba02c12b7446e63ccc86285c13bc5c7a432 Mon Sep 17 00:00:00 2001 +From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> +Date: Sat, 25 Jan 2020 09:16:14 +0100 +Subject: [PATCH 2/3] dlt-test-init-free: fix build failure with strict + compiler flags, due to uint being undefined. This is actually an "int" type, + looking at the test implementation + +Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> +Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org> +--- + src/tests/dlt-test-init-free.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/tests/dlt-test-init-free.c b/src/tests/dlt-test-init-free.c +index 96b5245..35b8803 100644 +--- a/src/tests/dlt-test-init-free.c ++++ b/src/tests/dlt-test-init-free.c +@@ -32,7 +32,7 @@ + + void exec(const char *cmd, char *buffer, size_t length); + void printMemoryUsage(); +-char *occupyMemory(uint size); ++char *occupyMemory(int size); + void do_example_test(); + void do_dlt_test(); + +@@ -131,7 +131,7 @@ void printMemoryUsage() + printf("%s", result); + } + +-char *occupyMemory(uint size) ++char *occupyMemory(int size) + { + char *buf = (char *)malloc(size * sizeof(char)); + + +From c790d61fad382e5d3e648ee99904087eb9bc4a77 Mon Sep 17 00:00:00 2001 +From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> +Date: Sat, 25 Jan 2020 09:20:48 +0100 +Subject: [PATCH 3/3] sys/poll.h: deprecate old sys/poll.h include header, now + glibc/musl wants poll.h being included directly. This fixes a build failure + on musl systems with strict c hardening flags + +Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> +Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org> +--- + src/console/logstorage/dlt-logstorage-ctrl.c | 2 +- + src/daemon/dlt_daemon_event_handler.c | 2 +- + src/daemon/dlt_daemon_event_handler.h | 2 +- + src/daemon/dlt_daemon_event_handler_types.h | 2 +- + src/lib/dlt_user.c | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/console/logstorage/dlt-logstorage-ctrl.c b/src/console/logstorage/dlt-logstorage-ctrl.c +index 525c137..6614f44 100644 +--- a/src/console/logstorage/dlt-logstorage-ctrl.c ++++ b/src/console/logstorage/dlt-logstorage-ctrl.c +@@ -61,7 +61,7 @@ + #include <string.h> + #include <getopt.h> + +-#include <sys/poll.h> ++#include <poll.h> + + #if defined(__linux__) + # include "sd-daemon.h" +diff --git a/src/daemon/dlt_daemon_event_handler.c b/src/daemon/dlt_daemon_event_handler.c +index 1611f7b..0d463da 100644 +--- a/src/daemon/dlt_daemon_event_handler.c ++++ b/src/daemon/dlt_daemon_event_handler.c +@@ -30,7 +30,7 @@ + #include <string.h> + #include <errno.h> + +-#include <sys/poll.h> ++#include <poll.h> + #include <syslog.h> + + #include "dlt_common.h" +diff --git a/src/daemon/dlt_daemon_event_handler.h b/src/daemon/dlt_daemon_event_handler.h +index eb96101..bd550d3 100644 +--- a/src/daemon/dlt_daemon_event_handler.h ++++ b/src/daemon/dlt_daemon_event_handler.h +@@ -25,7 +25,7 @@ + * \file dlt_daemon_event_handler.h + */ + +-#include <sys/poll.h> ++#include <poll.h> + + #include "dlt_daemon_connection_types.h" + #include "dlt_daemon_event_handler_types.h" +diff --git a/src/daemon/dlt_daemon_event_handler_types.h b/src/daemon/dlt_daemon_event_handler_types.h +index 370e503..0b16d08 100644 +--- a/src/daemon/dlt_daemon_event_handler_types.h ++++ b/src/daemon/dlt_daemon_event_handler_types.h +@@ -25,7 +25,7 @@ + * \file dlt_daemon_event_handler_types.h + */ + +-#include <sys/poll.h> ++#include <poll.h> + + #include "dlt_daemon_connection_types.h" + +#diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c +#index ffa9b09..511f991 100644 +#--- a/src/lib/dlt_user.c +#+++ b/src/lib/dlt_user.c +#@@ -43,7 +43,7 @@ +# #include <errno.h> +# +# #include <sys/uio.h> /* writev() */ +#-#include <sys/poll.h> +#+#include <poll.h> +# +# #include <limits.h> +# #ifdef linux diff --git a/external/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.4.bb b/external/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.4.bb new file mode 100644 index 00000000..35c638bc --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.4.bb @@ -0,0 +1,62 @@ +SUMMARY = "Diagnostic Log and Trace" +DESCRIPTION = "This component provides a standardised log and trace interface, \ +based on the standardised protocol specified in the AUTOSAR standard 4.0 DLT. \ +This component can be used by GENIVI components and other applications as \ +logging facility providing: \ +- the DLT shared library \ +- the DLT daemon, including startup scripts \ +- the DLT daemon adaptors- the DLT client console utilities \ +- the DLT test applications" +HOMEPAGE = "https://www.genivi.org/" +SECTION = "console/utils" +LICENSE = "MPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8184208060df880fe3137b93eb88aeea" + +DEPENDS = "zlib gzip-native" + +SRC_URI = "git://github.com/GENIVI/${BPN}.git;protocol=https \ + file://0002-Don-t-execute-processes-as-a-specific-user.patch \ + file://0004-Modify-systemd-config-directory.patch \ + file://204.patch \ +" +SRCREV = "14ea971be7e808b9c5099c7f404ed3cf341873c4" + +S = "${WORKDIR}/git" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES','systemd', d)}" +# General options +PACKAGECONFIG[dlt-examples] = "-DWITH_DLT_EXAMPLES=ON,-DWITH_DLT_EXAMPLES=OFF,,dlt-daemon-systemd" + +# Linux options +PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF,systemd" +PACKAGECONFIG[systemd-watchdog] = "-DWITH_SYSTEMD_WATCHDOG=ON,-DWITH_SYSTEMD_WATCHDOG=OFF,systemd,libsystemd" +PACKAGECONFIG[systemd-journal] = "-DWITH_SYSTEMD_JOURNAL=ON,-DWITH_SYSTEMD_JOURNAL=OFF,systemd,libsystemd" +PACKAGECONFIG[dlt-dbus] = "-DWITH_DLT_DBUS=ON,-DWITH_DLT_DBUS=OFF,dbus,dbus-lib" +PACKAGECONFIG[udp-connection] = "-DWITH_UDP_CONNECTION=ON,-DWITH_UDP_CONNECTION=OFF" + +# Command line options +PACKAGECONFIG[dlt-system] = "-DWITH_DLT_SYSTEM=ON,-DWITH_DLT_SYSTEM=OFF" +PACKAGECONFIG[dlt-adaptor] = "-DWITH_DLT_ADAPTOR=ON,-DWITH_DLT_ADAPTOR=OFF,,dlt-daemon-systemd" +PACKAGECONFIG[dlt-console] = "-DWITH_DLT_CONSOLE=ON,-DWITH_DLT_CONSOLE=OFF,,dlt-daemon-systemd" + +inherit autotools gettext cmake systemd + +EXTRA_OECMAKE += "-DSYSTEMD_UNITDIR=${systemd_system_unitdir}" + +PACKAGES += "${PN}-systemd" +SYSTEMD_PACKAGES = "${PN} ${PN}-systemd" +SYSTEMD_SERVICE_${PN} = " ${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'dlt.service', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'dlt-system', 'dlt-system.service', '', d)}" +SYSTEMD_AUTO_ENABLE_${PN} = "enable" +SYSTEMD_SERVICE_${PN}-systemd = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'dlt-adaptor', 'dlt-adaptor-udp.service', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'dlt-examples', 'dlt-example-user.service', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'dlt-examples dlt-console', 'dlt-receive.service', '', d)} \ +" +SYSTEMD_AUTO_ENABLE_${PN}-systemd = "disable" + +FILES_${PN}-doc += "${datadir}/dlt-filetransfer" + +do_install_append() { + rm -f ${D}${bindir}/dlt-test-* +} diff --git a/external/meta-openembedded/meta-oe/recipes-extended/docopt.cpp/docopt.cpp/0001-Set-library-VERSION-and-SOVERSION.patch b/external/meta-openembedded/meta-oe/recipes-extended/docopt.cpp/docopt.cpp/0001-Set-library-VERSION-and-SOVERSION.patch new file mode 100644 index 00000000..d4c77656 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/docopt.cpp/docopt.cpp/0001-Set-library-VERSION-and-SOVERSION.patch @@ -0,0 +1,31 @@ +From a47ca75702318ff43446c70120f7aacde4ccee1b Mon Sep 17 00:00:00 2001 +From: Eero Aaltonen <eero.aaltonen@vaisala.com> +Date: Thu, 20 Jun 2019 16:21:20 +0300 +Subject: [PATCH] Set library VERSION and SOVERSION + +With soversion and version specified, `install` target will install the +library with the specified version and also create the proper symlink. + +Upstream-Status: Submitted [https://github.com/docopt/docopt.cpp/pull/112] +but unlikely to be merged soon as it is a duplicate of +[https://github.com/docopt/docopt.cpp/pull/112] which has been **Open** +since 2016-12-08. +--- + CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 23da468..feff32e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -50,6 +50,10 @@ else() + set_target_properties(docopt_o PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + + add_library(docopt SHARED $<TARGET_OBJECTS:docopt_o>) ++ set_target_properties(docopt PROPERTIES ++ VERSION ${PROJECT_VERSION} ++ SOVERSION ${PROJECT_VERSION_MAJOR} ++ ) + add_library(docopt_s STATIC $<TARGET_OBJECTS:docopt_o>) + endif() + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/docopt.cpp/docopt.cpp_git.bb b/external/meta-openembedded/meta-oe/recipes-extended/docopt.cpp/docopt.cpp_git.bb new file mode 100644 index 00000000..aa55ebf8 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/docopt.cpp/docopt.cpp_git.bb @@ -0,0 +1,27 @@ +SUMMARY = "C++11 port of docopt command-line interface description language and parser" + +DESCRIPTION = "docopt is library that lets you define a command line interface with the \ +utility argument syntax that has been used by command line utilities for \ +decades (formalized in POSIX.1-2017). From the description, docopt \ +automatically generates a parser for the command line arguments." + +HOMEPAGE = "https://github.com/docopt/docopt.cpp" + +LICENSE = "MIT | BSL-1.0" +LIC_FILES_CHKSUM = "\ + file://LICENSE-Boost-1.0;md5=e4224ccaecb14d942c71d31bef20d78c \ + file://LICENSE-MIT;md5=4b242fd9ef20207e18286d73da8a6677 \ +" + +DEPENDS = "boost" +SRCREV = "3dd23e3280f213bacefdf5fcb04857bf52e90917" +PV = "0.6.2+git${SRCPV}" + +SRC_URI = "\ + git://github.com/docopt/docopt.cpp.git;protocol=https \ + file://0001-Set-library-VERSION-and-SOVERSION.patch \ +" + +S = "${WORKDIR}/git" + +inherit cmake diff --git a/external/meta-openembedded/meta-oe/recipes-extended/dumb-init/dumb-init_1.2.0.bb b/external/meta-openembedded/meta-oe/recipes-extended/dumb-init/dumb-init_1.2.2.bb index e1a6d950..09eab9dc 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/dumb-init/dumb-init_1.2.0.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/dumb-init/dumb-init_1.2.2.bb @@ -3,9 +3,9 @@ HOMEPAGE = "https://github.com/Yelp/dumb-init/" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=5940d39995ea6857d01b8227109c2e9c" -SRC_URI = "https://github.com/Yelp/dumb-init/archive/v${PV}.tar.gz" -SRC_URI[md5sum] = "4eb7f43d7823686723ff7ac1bad097cb" -SRC_URI[sha256sum] = "74486997321bd939cad2ee6af030f481d39751bc9aa0ece84ed55f864e309a3f" +SRCREV = "b1e978e486114797347deefcc03ab12629a13cc3" +SRC_URI = "git://github.com/Yelp/dumb-init" +S = "${WORKDIR}/git" EXTRA_OEMAKE = "CC='${CC}' CFLAGS='${CFLAGS} ${LDFLAGS}'" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/enscript/enscript/0001-Fix-builds-with-recent-gettext.patch b/external/meta-openembedded/meta-oe/recipes-extended/enscript/enscript/0001-Fix-builds-with-recent-gettext.patch new file mode 100644 index 00000000..ecfafce1 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/enscript/enscript/0001-Fix-builds-with-recent-gettext.patch @@ -0,0 +1,24 @@ +From 771cd2a12db8b8c9a558f1a04958df8ed614f2e0 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Fri, 20 Dec 2019 14:06:50 +0100 +Subject: [PATCH] Fix builds with recent gettext + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index dedabd6..8833ac9 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -22,7 +22,7 @@ + # along with Enscript. If not, see <http://www.gnu.org/licenses/>. + # + +-SUBDIRS = intl compat afm afmlib lib scripts src po states docs w32 ++SUBDIRS = compat afm afmlib lib scripts src po states docs w32 + + EXTRA_DIST = README.ESCAPES README.DOS ascii.txt \ + asciifise.txt asciidkno.txt 88591.txt 88592.txt 88593.txt 88594.txt \ diff --git a/external/meta-openembedded/meta-oe/recipes-extended/enscript/enscript_1.6.6.bb b/external/meta-openembedded/meta-oe/recipes-extended/enscript/enscript_1.6.6.bb index 2b6d14e6..82791f57 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/enscript/enscript_1.6.6.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/enscript/enscript_1.6.6.bb @@ -12,7 +12,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ file://enscript-autoconf.patch \ -" + file://0001-Fix-builds-with-recent-gettext.patch \ + " inherit autotools gettext diff --git a/external/meta-openembedded/meta-oe/recipes-extended/figlet/figlet/0001-build-add-autotools-support-to-allow-easy-cross-comp.patch b/external/meta-openembedded/meta-oe/recipes-extended/figlet/figlet/0001-build-add-autotools-support-to-allow-easy-cross-comp.patch new file mode 100644 index 00000000..4429a474 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/figlet/figlet/0001-build-add-autotools-support-to-allow-easy-cross-comp.patch @@ -0,0 +1,252 @@ +From 902b022c03ad6769abe4d7e6fde1df7a883857ef Mon Sep 17 00:00:00 2001 +From: Bartosz Golaszewski <bgolaszewski@baylibre.com> +Date: Tue, 24 Mar 2020 14:44:54 +0100 +Subject: [PATCH] build: add autotools support to allow easy cross-compilation + +Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> +Upstream-Status: Inappropriate [upstream uses a custom Makefile and builds on + linux as well as Windows. I'm not sure autotools + would be preferred as a general solution but it + works well enough for yocto.] +--- + Makefile | 122 --------------------------------------------------- + Makefile.am | 67 ++++++++++++++++++++++++++++ + configure.ac | 23 ++++++++++ + 3 files changed, 90 insertions(+), 122 deletions(-) + delete mode 100644 Makefile + create mode 100644 Makefile.am + create mode 100644 configure.ac + +diff --git a/Makefile b/Makefile +deleted file mode 100644 +index e92bcaf..0000000 +--- a/Makefile ++++ /dev/null +@@ -1,122 +0,0 @@ +-# Makefile for figlet version 2.2.4 (26 Jan 2011) +-# adapted from Makefile for figlet version 2.2.2 (05 July 2005) +-# adapted from Makefile for figlet version 2.2 (15 Oct 1996) +-# Copyright 1993, 1994,1995 Glenn Chappell and Ian Chai +-# Copyright 1996, 1997, 1998, 1999, 2000, 2001 John Cowan +-# Copyright 2002 Christiaan Keet +-# Copyright 2011 Claudio Matsuoka +- +-# Please notice that to follow modern standards and ease third-party +-# package creation, binaries are now installed under BINDIR, and DESTDIR +-# is reserved for the installation pathname prefix. +-# +-# Please make sure BINDIR, MANDIR, DEFAULTFONTDIR and +-# DEFAULTFONTFILE are defined to reflect the situation +-# on your computer. See README for details. +- +-# Don't change this even if your shell is different. The only reason +-# for changing this is if sh is not in the same place. +-SHELL = /bin/sh +- +-# The C compiler and linker to use +-CC = gcc +-CFLAGS = -g -O2 -Wall -Wno-unused-value +-LD = gcc +-LDFLAGS = +- +-# Feature flags: +-# define TLF_FONTS to use TOIlet TLF fonts +-XCFLAGS = -DTLF_FONTS +- +-# Where to install files +-prefix = /usr/local +- +-# Where the executables should be put +-BINDIR = $(prefix)/bin +- +-# Where the man page should be put +-MANDIR = $(prefix)/man +- +-# Where figlet will search first for fonts (the ".flf" files). +-DEFAULTFONTDIR = $(prefix)/share/figlet +-# Use this definition if you can't put things in $(prefix)/share/figlet +-#DEFAULTFONTDIR = fonts +- +-# The filename of the font to be used if no other is specified, +-# without suffix.(standard is recommended, but any other can be +-# used). This font file should reside in the directory specified +-# by DEFAULTFONTDIR. +-DEFAULTFONTFILE = standard +- +-## +-## END OF CONFIGURATION SECTION +-## +- +-VERSION = 2.2.5 +-DIST = figlet-$(VERSION) +-OBJS = figlet.o zipio.o crc.o inflate.o utf8.o +-BINS = figlet chkfont figlist showfigfonts +-MANUAL = figlet.6 chkfont.6 figlist.6 showfigfonts.6 +-DFILES = Makefile Makefile.tc $(MANUAL) $(OBJS:.o=.c) chkfont.c getopt.c \ +- figlist showfigfonts CHANGES FAQ README LICENSE figfont.txt \ +- crc.h inflate.h zipio.h utf8.h run-tests.sh figmagic +- +-.c.o: +- $(CC) -c $(CFLAGS) $(XCFLAGS) -DDEFAULTFONTDIR=\"$(DEFAULTFONTDIR)\" \ +- -DDEFAULTFONTFILE=\"$(DEFAULTFONTFILE)\" -o $*.o $< +- +-all: $(BINS) +- +-figlet: $(OBJS) +- $(LD) $(LDFLAGS) -o $@ $(OBJS) +- +-chkfont: chkfont.o +- $(LD) $(LDFLAGS) -o $@ chkfont.o +- +-clean: +- rm -f *.o *~ core figlet chkfont +- +-install: all +- mkdir -p $(DESTDIR)$(BINDIR) +- mkdir -p $(DESTDIR)$(MANDIR)/man6 +- mkdir -p $(DESTDIR)$(DEFAULTFONTDIR) +- cp $(BINS) $(DESTDIR)$(BINDIR) +- cp $(MANUAL) $(DESTDIR)$(MANDIR)/man6 +- cp fonts/*.flf $(DESTDIR)$(DEFAULTFONTDIR) +- cp fonts/*.flc $(DESTDIR)$(DEFAULTFONTDIR) +- +-dist: +- rm -Rf $(DIST) $(DIST).tar.gz +- mkdir $(DIST)/ +- cp $(DFILES) $(DIST)/ +- mkdir $(DIST)/fonts +- cp fonts/*.fl[fc] $(DIST)/fonts +- mkdir $(DIST)/tests +- cp tests/*txt tests/emboss.tlf $(DIST)/tests +- tar cvf - $(DIST) | gzip -9c > $(DIST).tar.gz +- rm -Rf $(DIST) +- tar xf $(DIST).tar.gz +- (cd $(DIST); make all check vercheck) +- @rm -Rf $(DIST) +- @echo +- @ls -l $(DIST).tar.gz +- +-check: +- @echo "Run tests in `pwd`" +- @./run-tests.sh fonts +- @echo +- +-vercheck: +- @printf "Infocode: "; ./figlet -I1 +- @./figlet -v|sed -n '/Version/s/.*\(Version\)/\1/p' +- @printf "README: "; head -1 < README|sed 's/.*) //' +- @printf "FAQ: "; grep latest FAQ|sed 's/ and can.*//' +- @grep -h "^\.TH" *.6 +- +-$(OBJS) chkfont.o getopt.o: Makefile +-chkfont.o: chkfont.c +-crc.o: crc.c crc.h +-figlet.o: figlet.c zipio.h +-getopt.o: getopt.c +-inflate.o: inflate.c inflate.h +-zipio.o: zipio.c zipio.h inflate.h crc.h +diff --git a/Makefile.am b/Makefile.am +new file mode 100644 +index 0000000..7feb42c +--- /dev/null ++++ b/Makefile.am +@@ -0,0 +1,67 @@ ++AM_CFLAGS = -include $(top_builddir)/config.h -Wall -Wextra -g ++ ++bin_PROGRAMS = figlet chkfont ++dist_bin_SCRIPTS = figlist showfigfonts ++ ++figlet_SOURCES = figlet.c zipio.c crc.c inflate.c utf8.c ++chkfont_SOURCES = chkfont.c ++ ++fontdir = $(prefix)/share/figlet ++dist_font_DATA = \ ++ fonts/646-ca2.flc \ ++ fonts/646-fr.flc \ ++ fonts/646-no.flc \ ++ fonts/8859-4.flc \ ++ fonts/bubble.flf \ ++ fonts/lean.flf \ ++ fonts/smscript.flf \ ++ fonts/utf8.flc \ ++ fonts/646-ca.flc \ ++ fonts/646-gb.flc \ ++ fonts/646-pt2.flc \ ++ fonts/8859-5.flc \ ++ fonts/digital.flf \ ++ fonts/mini.flf \ ++ fonts/smshadow.flf \ ++ fonts/646-cn.flc \ ++ fonts/646-hu.flc \ ++ fonts/646-pt.flc \ ++ fonts/8859-7.flc \ ++ fonts/frango.flc \ ++ fonts/mnemonic.flf \ ++ fonts/smslant.flf \ ++ fonts/646-cu.flc \ ++ fonts/646-irv.flc \ ++ fonts/646-se2.flc \ ++ fonts/8859-8.flc \ ++ fonts/hz.flc \ ++ fonts/moscow.flc \ ++ fonts/standard.flf \ ++ fonts/646-de.flc \ ++ fonts/646-it.flc \ ++ fonts/646-se.flc \ ++ fonts/8859-9.flc \ ++ fonts/ilhebrew.flc \ ++ fonts/script.flf \ ++ fonts/term.flf \ ++ fonts/646-dk.flc \ ++ fonts/646-jp.flc \ ++ fonts/646-yu.flc \ ++ fonts/banner.flf \ ++ fonts/ivrit.flf \ ++ fonts/shadow.flf \ ++ fonts/upper.flc \ ++ fonts/646-es2.flc \ ++ fonts/646-kr.flc \ ++ fonts/8859-2.flc \ ++ fonts/big.flf \ ++ fonts/jis0201.flc \ ++ fonts/slant.flf \ ++ fonts/ushebrew.flc \ ++ fonts/646-es.flc \ ++ fonts/646-no2.flc \ ++ fonts/8859-3.flc \ ++ fonts/block.flf \ ++ fonts/koi8r.flc \ ++ fonts/small.flf \ ++ fonts/uskata.flc +diff --git a/configure.ac b/configure.ac +new file mode 100644 +index 0000000..72154e2 +--- /dev/null ++++ b/configure.ac +@@ -0,0 +1,23 @@ ++AC_PREREQ(2.61) ++ ++AC_INIT([figlet], 2.2.5) ++ ++AC_CONFIG_AUX_DIR([autostuff]) ++AC_CONFIG_MACRO_DIRS([m4]) ++AM_INIT_AUTOMAKE([foreign subdir-objects]) ++m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) ++ ++AC_CONFIG_SRCDIR([figlet.c]) ++AC_CONFIG_HEADER([config.h]) ++ ++AC_DEFINE([DEFAULTFONTDIR], ["/usr/share/figlet"], [Default font directory]) ++AC_DEFINE([DEFAULTFONTFILE], ["standard"], [Default font]) ++ ++AM_PROG_AR ++AC_PROG_CC ++AC_PROG_INSTALL ++AC_HEADER_STDC ++ ++AC_CONFIG_FILES([Makefile]) ++ ++AC_OUTPUT +-- +2.25.0 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/figlet/figlet_git.bb b/external/meta-openembedded/meta-oe/recipes-extended/figlet/figlet_git.bb new file mode 100644 index 00000000..4611646b --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/figlet/figlet_git.bb @@ -0,0 +1,15 @@ +SUMMARY = "FIGlet is a program that creates large characters out of ordinary screen characters" +HOMEPAGE = "http://www.figlet.org/" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1688bcd97b27704f1afcac7336409857" + +SRC_URI = "git://github.com/cmatsuoka/figlet.git \ + file://0001-build-add-autotools-support-to-allow-easy-cross-comp.patch" +SRCREV = "5bbcd7383a8c3a531299b216b0c734e1495c6db3" +S = "${WORKDIR}/git" +PV = "2.2.5+git${SRCPV}" + +inherit autotools + +BBCLASSEXTEND = "native nativesdk" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-fluent-bit-shared-Link-with-lpthread.patch b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-fluent-bit-shared-Link-with-lpthread.patch deleted file mode 100644 index e9eed24b..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-fluent-bit-shared-Link-with-lpthread.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 62fa9bceb15a9d160dd5d624a6d46907c1019c5c Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 8 Sep 2017 17:02:55 -0700 -Subject: [PATCH] fluent-bit-shared: Link with -lpthread - -This fixes a reference to pthread_atfork in libfluent-bit.so -otherwise we get undefined reference to the symbols in binaries -which are linked with libfluent-bit.so - -Fixes errors like -arm-bec-linux-gnueabi-ld: ../../bin/hello_world: hidden symbol `pthread_atfork' in /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-gnueabi/fluentbit/0.12.1-r0/recipe-sysroot/usr/lib/libpthread_nonshared.a(pthread_atfork.oS) is referenced by DSO - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted - - src/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 425a246..1264e59 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -168,7 +168,7 @@ set(FLB_DEPS - # Shared Library - if(NOT FLB_WITHOUT_SHARED_LIB) - add_library(fluent-bit-shared SHARED ${src}) -- target_link_libraries(fluent-bit-shared ${FLB_DEPS}) -+ target_link_libraries(fluent-bit-shared ${FLB_DEPS} -lpthread) - set_target_properties(fluent-bit-shared - PROPERTIES OUTPUT_NAME fluent-bit) - --- -2.14.1 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-ppc-Fix-signature-for-co_create-API.patch b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-ppc-Fix-signature-for-co_create-API.patch new file mode 100644 index 00000000..1f36c657 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-ppc-Fix-signature-for-co_create-API.patch @@ -0,0 +1,38 @@ +From be4032079c931704f52e29f5da5c01cde24ac842 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 16 Jan 2020 10:44:58 -0800 +Subject: [PATCH] ppc: Fix signature for co_create API + +Upstream-Status: Submitted [https://github.com/fluent/fluent-bit/pull/1886] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + lib/flb_libco/ppc.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/lib/flb_libco/ppc.c b/lib/flb_libco/ppc.c +index e6536d56..533256b3 100644 +--- a/lib/flb_libco/ppc.c ++++ b/lib/flb_libco/ppc.c +@@ -279,7 +279,9 @@ static uint32_t* co_create_(unsigned size, uintptr_t entry) { + return t; + } + +-cothread_t co_create(unsigned int size, void (*entry_)(void)) { ++cothread_t co_create(unsigned int size, void (*entry_)(void), ++ size_t *out_size) { ++ + uintptr_t entry = (uintptr_t)entry_; + uint32_t* t = 0; + +@@ -325,7 +327,7 @@ cothread_t co_create(unsigned int size, void (*entry_)(void)) { + t[10] = (uint32_t)(sp >> shift >> shift); + t[11] = (uint32_t)sp; + } +- ++ *out_size = size; + return t; + } + +-- +2.25.0 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/builtin-nan.patch b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/builtin-nan.patch new file mode 100644 index 00000000..8ffc3be3 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/builtin-nan.patch @@ -0,0 +1,27 @@ +help complier to use intrinsics, clang in few cases e.g. aarch64 can not +and then requires linking with libm, its the only function needed from libm then +its good to avoid needing it. + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/include/fluent-bit/stream_processor/flb_sp_timeseries.h ++++ b/include/fluent-bit/stream_processor/flb_sp_timeseries.h +@@ -207,7 +207,7 @@ void cb_forecast_calc(struct timeseries + result = b0 + b1 * (val->f64 + *forecast->latest_x); + break; + default: +- result = nan(""); ++ result = __builtin_nan(""); + break; + } + +@@ -283,7 +283,7 @@ void cb_forecast_r_calc(struct timeserie + result = ((val->i64 - b0) / b1) - *forecast->latest_x; + break; + default: +- result = nan(""); ++ result = __builtin_nan(""); + break; + } + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/cross-build-init-system-detection.patch b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/cross-build-init-system-detection.patch new file mode 100644 index 00000000..a1857899 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/cross-build-init-system-detection.patch @@ -0,0 +1,38 @@ +Define CMake variables to indicate init system for target +incase of cross compile, detecting systemd support based on +host directory structure is not right thing to do + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.kheem@gmail.com> + +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -317,7 +317,7 @@ if(FLB_BINARY) + install(TARGETS fluent-bit-bin RUNTIME DESTINATION ${FLB_INSTALL_BINDIR}) + + # Detect init system, install upstart, systemd or init.d script +- if(IS_DIRECTORY /lib/systemd/system) ++ if(IS_DIRECTORY /lib/systemd/system OR FLB_SYSTEMD) + set(FLB_SYSTEMD_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.service") + configure_file( + "${PROJECT_SOURCE_DIR}/init/systemd.in" +@@ -325,7 +325,7 @@ if(FLB_BINARY) + ) + install(FILES ${FLB_SYSTEMD_SCRIPT} DESTINATION /lib/systemd/system) + install(DIRECTORY DESTINATION ${FLB_INSTALL_CONFDIR}) +- elseif(IS_DIRECTORY /usr/share/upstart) ++ elseif(IS_DIRECTORY /usr/share/upstart OR FLB_UPSTART) + set(FLB_UPSTART_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.conf") + configure_file( + "${PROJECT_SOURCE_DIR}/init/upstart.in" +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -70,6 +70,8 @@ option(FLB_RECORD_ACCESSOR "Enable re + option(FLB_SYSTEM_STRPTIME "Use strptime in system libc" Yes) + option(FLB_STATIC_CONF "Build binary using static configuration") + option(FLB_STREAM_PROCESSOR "Enable Stream Processor" Yes) ++option(FLB_SYSTEMD "Enable systemd init system" No) ++option(FLB_UPSTART "Enable upstart init system" No) + option(FLB_CORO_STACK_SIZE "Set coroutine stack size") + + # Metrics: Experimental Feature, disabled by default on 0.12 series diff --git a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/jemalloc.patch b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/jemalloc.patch index abaf92c0..67b3397a 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/jemalloc.patch +++ b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/jemalloc.patch @@ -3,16 +3,14 @@ Add --with-jemalloc-prefix=je_ so it compiles on musl Signed-off-by: Khem Raj <raj.khem@gmail.com> Upstream-Status: Pending -Index: fluent-bit-0.12.1/CMakeLists.txt -=================================================================== ---- fluent-bit-0.12.1.orig/CMakeLists.txt -+++ fluent-bit-0.12.1/CMakeLists.txt -@@ -325,7 +325,7 @@ if(FLB_JEMALLOC AND ${CMAKE_SYSTEM_NAME} +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -523,7 +523,7 @@ if(FLB_JEMALLOC AND ${CMAKE_SYSTEM_NAME} # Link to Jemalloc as an external dependency ExternalProject_Add(jemalloc - SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/jemalloc -- CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/jemalloc/configure ${AUTOCONF_HOST_OPT} --with-lg-quantum=3 --enable-cc-silence --prefix=<INSTALL_DIR> -+ CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/jemalloc/configure --with-jemalloc-prefix=je_ ${AUTOCONF_HOST_OPT} --with-lg-quantum=3 --enable-cc-silence --prefix=<INSTALL_DIR> + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/jemalloc-5.2.1 +- CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/jemalloc-5.2.1/configure ${AUTOCONF_HOST_OPT} --with-lg-quantum=3 --enable-cc-silence --prefix=<INSTALL_DIR> ++ CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/jemalloc-5.2.1/configure ${AUTOCONF_HOST_OPT} --with-jemalloc-prefix=je_ --with-lg-quantum=3 --enable-cc-silence --prefix=<INSTALL_DIR> CFLAGS=-std=gnu99\ -Wall\ -pipe\ -g3\ -O3\ -funroll-loops - BUILD_COMMAND ${MAKE} + BUILD_COMMAND $(MAKE) INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/ diff --git a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_0.12.1.bb b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_0.12.1.bb deleted file mode 100644 index 99f680f9..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_0.12.1.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "Fast data collector for Embedded Linux" -HOMEPAGE = "http://fluentbit.io" -BUGTRACKER = "https://github.com/fluent/fluent-bit/issues" - -SRC_URI = "http://fluentbit.io/releases/0.12/fluent-bit-${PV}.tar.gz \ - file://jemalloc.patch \ - file://0001-fluent-bit-shared-Link-with-lpthread.patch \ - " -SRC_URI[md5sum] = "6b4472cb7e7213a01425af9121576827" -SRC_URI[sha256sum] = "8ec05365baea723033165687611b3bba3e67a77dce72e282e9f000f7acf9e37b" - -S = "${WORKDIR}/fluent-bit-${PV}" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" - -DEPENDS = "zlib" -INSANE_SKIP_${PN}-dev += "dev-elf" - -inherit cmake systemd - -EXTRA_OECMAKE = "-DGNU_HOST=${HOST_SYS} -DFLB_ALL=ON -DFLB_TD=1" - -# With Ninja it fails with: -# ninja: error: build.ninja:134: bad $-escape (literal $ must be written as $$) -OECMAKE_GENERATOR = "Unix Makefiles" - -SYSTEMD_SERVICE_${PN} = "td-agent-bit.service" - -TARGET_CC_ARCH_append = " ${SELECTED_OPTIMIZATION}" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb new file mode 100644 index 00000000..06895a03 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb @@ -0,0 +1,58 @@ +SUMMARY = "Fast Log processor and Forwarder" +DESCRIPTION = "Fluent Bit is a data collector, processor and \ +forwarder for Linux. It supports several input sources and \ +backends (destinations) for your data. \ +" + +HOMEPAGE = "http://fluentbit.io" +BUGTRACKER = "https://github.com/fluent/fluent-bit/issues" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" +SECTION = "net" + +SRC_URI = "http://fluentbit.io/releases/1.3/fluent-bit-${PV}.tar.gz \ + file://jemalloc.patch \ + file://cross-build-init-system-detection.patch \ + file://builtin-nan.patch \ + file://0001-ppc-Fix-signature-for-co_create-API.patch \ + " +SRC_URI[md5sum] = "6eae6dfd0a874e5dd270c36e9c68f747" +SRC_URI[sha256sum] = "e037c76c89269c8dc4027a08e442fefd2751b0f1e0f9c38f9a4b12d781a9c789" + +S = "${WORKDIR}/fluent-bit-${PV}" +DEPENDS = "zlib bison-native flex-native" +DEPENDS_append_libc-musl = " fts " + +INSANE_SKIP_${PN}-dev += "dev-elf" + +# Use CMake 'Unix Makefiles' generator +OECMAKE_GENERATOR ?= "Unix Makefiles" + +# Fluent Bit build options +# ======================== + +# Host related setup +EXTRA_OECMAKE += "-DGNU_HOST=${HOST_SYS} -DFLB_ALL=ON -DFLB_TD=1" + +# Disable LuaJIT and filter_lua support +EXTRA_OECMAKE += "-DFLB_LUAJIT=Off -DFLB_FILTER_LUA=Off " + +# Disable Library and examples +EXTRA_OECMAKE += "-DFLB_SHARED_LIB=Off -DFLB_EXAMPLES=Off " + +EXTRA_OECMAKE += "${@bb.utils.contains('DISTRO_FEATURES','systemd','-DFLB_SYSTEMD=On','',d)}" + +EXTRA_OECMAKE_append_riscv64 = " -DFLB_DEPS='atomic'" + +# Kafka Output plugin (disabled by default): note that when +# enabling Kafka output plugin, the backend library librdkafka +# requires 'openssl' as a dependency. +# +# DEPENDS += "openssl " +# EXTRA_OECMAKE += "-DFLB_OUT_KAFKA=On " + +inherit cmake systemd features_check + +SYSTEMD_SERVICE_${PN} = "td-agent-bit.service" +TARGET_CC_ARCH_append = " ${SELECTED_OPTIMIZATION}" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot_5.2.2.bb b/external/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot_5.2.8.bb index f9fd8ae8..926d8851 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot_5.2.2.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot_5.2.8.bb @@ -7,7 +7,7 @@ LICENSE = "gnuplot" LIC_FILES_CHKSUM = "file://Copyright;md5=243a186fc2fd3b992125d60d5b1bab8f" DEPENDS = "${BPN}-native virtual/libx11 gd readline" -inherit autotools distro_features_check +inherit autotools features_check # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" @@ -22,8 +22,8 @@ SRC_URI_append_class-target = " \ file://0004-Add-configure-option-to-find-qt5-native-tools.patch \ " -SRC_URI[archive.md5sum] = "60aedd08998160593199459dea8467fe" -SRC_URI[archive.sha256sum] = "a416d22f02bdf3873ef82c5eb7f8e94146795811ef808e12b035ada88ef7b1a1" +SRC_URI[archive.md5sum] = "2df8767c7399bee57a96296d46b4d5fb" +SRC_URI[archive.sha256sum] = "60a6764ccf404a1668c140f11cc1f699290ab70daa1151bb58fed6139a28ac37" SRC_URI[qtplot.md5sum] = "0a481885a496092c77eb4017540b5cf6" SRC_URI[qtplot.sha256sum] = "6df317183ff62cc82f3dcf88207a267cd6478cb5147f55d7530c94f1ad5f4132" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/haveged/haveged/haveged-init.d-Makefile.am-add-missing-dependency.patch b/external/meta-openembedded/meta-oe/recipes-extended/haveged/haveged/haveged-init.d-Makefile.am-add-missing-dependency.patch deleted file mode 100644 index 36fd57c9..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/haveged/haveged/haveged-init.d-Makefile.am-add-missing-dependency.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b04eeea777df32364df74bd63fc5b7fb05d21c8d Mon Sep 17 00:00:00 2001 -From: Jackie Huang <jackie.huang@windriver.com> -Date: Tue, 27 Mar 2018 10:21:09 +0800 -Subject: [PATCH] init.d/Makefile.am: add missing dependency - -install-data-hook should epend on install-exec-hook, or the -haveged.service might be installed incorrectly when build -with -j option. - -Upstream-Status: Inappropriate [no upstream mailing list] - -Signed-off-by: Jackie Huang <jackie.huang@windriver.com> ---- - init.d/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/init.d/Makefile.am b/init.d/Makefile.am -index 5940f78..07bcdf7 100644 ---- a/init.d/Makefile.am -+++ b/init.d/Makefile.am -@@ -33,7 +33,7 @@ if ENABLE_SYSTEMD - install-exec-hook: - $(do_subst) < $(srcdir)/$(src_tmpl) > haveged.service; - --install-data-hook: -+install-data-hook: install-exec-hook - if ENABLE_SYSTEMD_LOOKUP - install -p -D -m644 haveged.service $(DESTDIR)`pkg-config --variable=systemdsystemunitdir systemd`/haveged.service; - else --- -2.11.0 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/haveged/haveged_1.9.2.bb b/external/meta-openembedded/meta-oe/recipes-extended/haveged/haveged_1.9.9.bb index bf136739..c1839b37 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/haveged/haveged_1.9.2.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/haveged/haveged_1.9.9.bb @@ -5,14 +5,13 @@ HOMEPAGE = "http://www.issihosts.com/haveged/index.html" LICENSE = "GPLv3" LIC_FILES_CHKSUM="file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -SRC_URI = "http://www.issihosts.com/haveged/haveged-${PV}.tar.gz \ - file://haveged-init.d-Makefile.am-add-missing-dependency.patch \ +# v1.9.9 +SRCREV = "6da706c8026b629d9bb7ebebc32239305a03da8e" +SRC_URI = "git://github.com/jirka-h/haveged.git \ " +S = "${WORKDIR}/git" -SRC_URI[md5sum] = "fb1d8b3dcbb9d06b30eccd8aa500fd31" -SRC_URI[sha256sum] = "f77d9adbdf421b61601fa29faa9ce3b479d910f73c66b9e364ba8642ccbfbe70" - -UPSTREAM_CHECK_URI = "http://www.issihosts.com/haveged/downloads.html" +UPSTREAM_CHECK_URI = "https://github.com/jirka-h/haveged/releases" inherit autotools update-rc.d systemd @@ -23,7 +22,7 @@ EXTRA_OECONF = "\ " PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" -PACKAGECONFIG[systemd] = "--enable-init=service.redhat --enable-initdir=${systemd_system_unitdir}, --enable-init=sysv.redhat, systemd" +PACKAGECONFIG[systemd] = "--enable-init=service.fedora --enable-initdir=${systemd_system_unitdir}, --enable-init=sysv.redhat, systemd" INITSCRIPT_PACKAGES = "${PN}" INITSCRIPT_NAME = "haveged" @@ -36,6 +35,12 @@ do_install_append() { # The exit status is 143 when the service is stopped if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then sed -i '/ExecStart/a SuccessExitStatus=143' ${D}${systemd_system_unitdir}/haveged.service + # Hybrid systemd-sysvinit distros must install the initscript manually + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}${INIT_D_DIR} + sed -e "s,@SBINDIR@,${sbindir},g" <${S}/init.d/sysv.redhat >${D}${INIT_D_DIR}/haveged + chmod 755 ${D}${INIT_D_DIR}/haveged + fi fi } diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch b/external/meta-openembedded/meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch index fef2bc75..1af5d26a 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch +++ b/external/meta-openembedded/meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch @@ -11,22 +11,18 @@ Signed-off-by: Andrea Galbusera <gizero@gmail.com> Makefile | 5 ----- 1 file changed, 5 deletions(-) -diff --git a/Makefile b/Makefile -index 8b0f0c2..66a4317 100644 --- a/Makefile +++ b/Makefile -@@ -34,11 +34,6 @@ define REDIS_TEST_CONFIG +@@ -35,12 +35,6 @@ define REDIS_TEST_CONFIG endef export REDIS_TEST_CONFIG -# Fallback to gcc when $CC is not in $PATH. --CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc') +-CC:=$(shell sh -c 'type $${CC%% *} >/dev/null 2>/dev/null && echo $(CC) || echo gcc') +-CXX:=$(shell sh -c 'type $${CXX%% *} >/dev/null 2>/dev/null && echo $(CXX) || echo g++') -OPTIMIZATION?=-O3 -WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings --DEBUG?= -g -ggdb - REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG) $(ARCH) - REAL_LDFLAGS=$(LDFLAGS) $(ARCH) +-DEBUG_FLAGS?= -g -ggdb + REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) + REAL_LDFLAGS=$(LDFLAGS) --- -1.9.1 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb b/external/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis_0.14.0.bb index fae30d77..29f8de8d 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis_0.13.1.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis_0.14.0.bb @@ -5,14 +5,15 @@ SECTION = "libs" DEPENDS = "redis" LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51" -SRC_URI = "git://github.com/redis/hiredis;protocol=git;rev=f58dd249d6ed47a7e835463c3b04722972281dbb \ +SRCREV = "685030652cd98c5414ce554ff5b356dfe8437870" +SRC_URI = "git://github.com/redis/hiredis;protocol=git \ file://0001-Makefile-remove-hardcoding-of-CC.patch" S = "${WORKDIR}/git" inherit autotools-brokensep pkgconfig -EXTRA_OEMAKE = "PREFIX=${prefix}" +EXTRA_OEMAKE = "PREFIX=${prefix} LIBRARY_PATH=${baselib}" # By default INSTALL variable in Makefile is equal to 'cp -a', which preserves # ownership and causes host-user-contamination QA issue. diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip-3.12.6/0001-include-cups-ppd.h-for-missing-ppd-definitions.patch b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip-3.12.6/0001-include-cups-ppd.h-for-missing-ppd-definitions.patch deleted file mode 100644 index f259b5f0..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip-3.12.6/0001-include-cups-ppd.h-for-missing-ppd-definitions.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 7ef9c040dd959105c16d4dc67e14f3bbea25e77f Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 16 Dec 2016 19:51:19 +0000 -Subject: [PATCH] include cups/ppd.h for missing ppd definitions - -Fixes errors spotted by clang - -| prnt/hpcups/HPCupsFilter.cpp:365:18: error: use of undeclared identifier 'ppdFindAttr' -| if (((attr = ppdFindAttr(m_ppd, "hpPrinterLanguage", NULL)) == NULL) || -| ^ -| prnt/hpcups/HPCupsFilter.cpp:368:13: error: use of undeclared identifier 'ppdClose' -| ppdClose(m_ppd); -| ^ -| prnt/hpcups/HPCupsFilter.cpp:444:9: error: use of undeclared identifier 'ppdClose' -| ppdClose(m_ppd); -| ^ -| prnt/hpcups/HPCupsFilter.cpp:497:13: error: use of undeclared identifier 'ppdOpenFile' -| m_ppd = ppdOpenFile(getenv("PPD")); -| ^ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - prnt/hpcups/HPCupsFilter.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/prnt/hpcups/HPCupsFilter.h b/prnt/hpcups/HPCupsFilter.h -index 0431a7a..eb0cad6 100644 ---- a/prnt/hpcups/HPCupsFilter.h -+++ b/prnt/hpcups/HPCupsFilter.h -@@ -37,6 +37,7 @@ - #include "Job.h"
-
- #include "dbuscomm.h"
-+#include <cups/ppd.h>
-
- #define DBITMAPFILEHEADER 14
- #define DBITMAPINFOHEADER 40
--- -1.9.1 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip-3.12.6/configure.patch b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip-3.12.6/configure.patch deleted file mode 100644 index 31c005c6..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip-3.12.6/configure.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: hplip-3.12.6/configure.in -=================================================================== ---- hplip-3.12.6.orig/configure.in 2014-07-16 20:03:51.310044196 +0000 -+++ hplip-3.12.6/configure.in 2014-07-18 07:53:31.589559192 +0000 -@@ -27,8 +27,7 @@ - - #AC_PREREQ(2.59) - AC_INIT([HP Linux Imaging and Printing], [3.12.6], [3.12.6], [hplip]) --#AM_INIT_AUTOMAKE([1.9 foreign]) --AM_INIT_AUTOMAKE -+AM_INIT_AUTOMAKE([1.9 foreign]) - AC_DISABLE_STATIC - - # Checks for programs. diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip-3.12.6/cups-1.6.patch b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip-3.12.6/cups-1.6.patch deleted file mode 100644 index 7df01aab..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip-3.12.6/cups-1.6.patch +++ /dev/null @@ -1,395 +0,0 @@ -Imported from gentoo: -https://bugs.gentoo.org/show_bug.cgi?id=428672 - -diff -Naur hplip-3.12.6_old/prnt/cupsext/cupsext.c hplip-3.12.6/prnt/cupsext/cupsext.c ---- hplip-3.12.6_old/prnt/cupsext/cupsext.c 2012-08-04 09:18:18.388330038 +0200 -+++ hplip-3.12.6/prnt/cupsext/cupsext.c 2012-08-04 09:18:27.855181327 +0200 -@@ -87,6 +87,46 @@ - #define PY_SSIZE_T_MIN INT_MIN
- #endif
-
-+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
-+#define HAVE_CUPS_1_6 1
-+#endif
-+
-+#ifndef HAVE_CUPS_1_6
-+#define ippGetCount(attr) attr->num_values
-+#define ippGetGroupTag(attr) attr->group_tag
-+#define ippGetValueTag(attr) attr->value_tag
-+#define ippGetName(attr) attr->name
-+#define ippGetBoolean(attr, element) attr->values[element].boolean
-+#define ippGetInteger(attr, element) attr->values[element].integer
-+#define ippGetStatusCode(ipp) ipp->request.status.status_code
-+#define ippGetString(attr, element, language) attr->values[element].string.text
-+
-+static ipp_attribute_t * ippFirstAttribute( ipp_t *ipp )
-+{
-+ if (!ipp)
-+ return (NULL);
-+ return (ipp->current = ipp->attrs);
-+}
-+
-+static ipp_attribute_t * ippNextAttribute( ipp_t *ipp )
-+{
-+ if (!ipp || !ipp->current)
-+ return (NULL);
-+ return (ipp->current = ipp->current->next);
-+}
-+
-+static int ippSetOperation( ipp_t *ipp, ipp_op_t op )
-+{
-+ ipp->request.op.operation_id = op;
-+ return (1);
-+}
-+
-+static int ippSetRequestId( ipp_t *ipp, int request_id )
-+{
-+ ipp->request.any.request_id = request_id;
-+ return (1);
-+}
-+#endif
-
- int g_num_options = 0;
- cups_option_t * g_options;
-@@ -333,8 +373,8 @@ - request = ippNew();
- language = cupsLangDefault();
-
-- request->request.op.operation_id = CUPS_GET_PRINTERS;
-- request->request.any.request_id = 1;
-+ ippSetOperation( request, CUPS_GET_PRINTERS );
-+ ippSetRequestId ( request, 1);
-
- ippAddString( request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
- "attributes-charset", NULL, cupsLangEncoding( language ) );
-@@ -378,10 +418,10 @@ - ipp_pstate_t state;
- int i = 0;
-
-- for ( attr = response->attrs; attr != NULL; attr = attr->next )
-+ for ( attr = ippFirstAttribute( response ); attr != NULL; attr = ippNextAttribute( response ) )
- {
-- while ( attr != NULL && attr->group_tag != IPP_TAG_PRINTER )
-- attr = attr->next;
-+ while ( attr != NULL && ippGetGroupTag( attr ) != IPP_TAG_PRINTER )
-+ attr = ippNextAttribute( response );
-
- if ( attr == NULL )
- break;
-@@ -390,41 +430,41 @@ - state = IPP_PRINTER_IDLE;
- accepting = 0;
-
-- while ( attr != NULL && attr->group_tag == IPP_TAG_PRINTER )
-+ while ( attr != NULL && ippGetGroupTag( attr ) == IPP_TAG_PRINTER )
- {
-- if ( strcmp( attr->name, "printer-name" ) == 0 &&
-- attr->value_tag == IPP_TAG_NAME )
-- name = attr->values[ 0 ].string.text;
--
-- else if ( strcmp( attr->name, "device-uri" ) == 0 &&
-- attr->value_tag == IPP_TAG_URI )
-- device_uri = attr->values[ 0 ].string.text;
--
-- else if ( strcmp( attr->name, "printer-uri-supported" ) == 0 &&
-- attr->value_tag == IPP_TAG_URI )
-- printer_uri = attr->values[ 0 ].string.text;
--
-- else if ( strcmp( attr->name, "printer-info" ) == 0 &&
-- attr->value_tag == IPP_TAG_TEXT )
-- info = attr->values[ 0 ].string.text;
--
-- else if ( strcmp( attr->name, "printer-location" ) == 0 &&
-- attr->value_tag == IPP_TAG_TEXT )
-- location = attr->values[ 0 ].string.text;
--
-- else if ( strcmp( attr->name, "printer-make-and-model" ) == 0 &&
-- attr->value_tag == IPP_TAG_TEXT )
-- make_model = attr->values[ 0 ].string.text;
--
-- else if ( strcmp( attr->name, "printer-state" ) == 0 &&
-- attr->value_tag == IPP_TAG_ENUM )
-- state = ( ipp_pstate_t ) attr->values[ 0 ].integer;
--
-- else if (!strcmp(attr->name, "printer-is-accepting-jobs") &&
-- attr->value_tag == IPP_TAG_BOOLEAN)
-- accepting = attr->values[ 0 ].boolean;
-+ if ( strcmp( ippGetName( attr ), "printer-name" ) == 0 &&
-+ ippGetValueTag( attr ) == IPP_TAG_NAME )
-+ name = ippGetString( attr, 0, NULL );
-+
-+ else if ( strcmp( ippGetName( attr ), "device-uri" ) == 0 &&
-+ ippGetValueTag( attr ) == IPP_TAG_URI )
-+ device_uri = ippGetString( attr, 0, NULL );
-+
-+ else if ( strcmp( ippGetName( attr ), "printer-uri-supported" ) == 0 &&
-+ ippGetValueTag( attr ) == IPP_TAG_URI )
-+ printer_uri = ippGetString( attr, 0, NULL );
-+
-+ else if ( strcmp( ippGetName( attr ), "printer-info" ) == 0 &&
-+ ippGetValueTag( attr ) == IPP_TAG_TEXT )
-+ info = ippGetString( attr, 0, NULL );
-+
-+ else if ( strcmp( ippGetName( attr ), "printer-location" ) == 0 &&
-+ ippGetValueTag( attr ) == IPP_TAG_TEXT )
-+ location = ippGetString( attr, 0, NULL );
-+
-+ else if ( strcmp( ippGetName( attr ), "printer-make-and-model" ) == 0 &&
-+ ippGetValueTag( attr ) == IPP_TAG_TEXT )
-+ make_model = ippGetString( attr, 0, NULL );
-+
-+ else if ( strcmp( ippGetName( attr ), "printer-state" ) == 0 &&
-+ ippGetValueTag( attr ) == IPP_TAG_ENUM )
-+ state = ( ipp_pstate_t ) ippGetInteger( attr, 0 );
-+
-+ else if (!strcmp(ippGetName( attr ), "printer-is-accepting-jobs") &&
-+ ippGetValueTag( attr ) == IPP_TAG_BOOLEAN)
-+ accepting = ippGetBoolean( attr, 0 );
-
-- attr = attr->next;
-+ attr = ippNextAttribute( response );
- }
-
- if ( device_uri == NULL )
-@@ -522,8 +562,8 @@ - request = ippNew();
- language = cupsLangDefault();
-
-- request->request.op.operation_id = CUPS_ADD_PRINTER;
-- request->request.any.request_id = 1;
-+ ippSetOperation( request, CUPS_ADD_PRINTER );
-+ ippSetRequestId ( request, 1 );
-
- ippAddString( request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
- "attributes-charset", NULL, cupsLangEncoding( language ) );
-@@ -568,7 +608,7 @@ - }
- else
- {
-- status = response->request.status.status_code;
-+ status = ippGetStatusCode( response );
- //ippDelete( response );
- r = 1;
- }
-@@ -631,8 +671,8 @@ - */
- request = ippNew();
-
-- request->request.op.operation_id = CUPS_DELETE_PRINTER;
-- request->request.op.request_id = 1;
-+ ippSetOperation( request, CUPS_DELETE_PRINTER );
-+ ippSetRequestId ( request, 1 );
-
- language = cupsLangDefault();
-
-@@ -650,7 +690,7 @@ - */
- response = cupsDoRequest( http, request, "/admin/" );
-
-- if ( ( response != NULL ) && ( response->request.status.status_code <= IPP_OK_CONFLICT ) )
-+ if ( ( response != NULL ) && ( ippGetStatusCode( response ) <= IPP_OK_CONFLICT ) )
- {
- r = 1;
- }
-@@ -721,8 +761,8 @@ -
- request = ippNew();
-
-- request->request.op.operation_id = CUPS_SET_DEFAULT;
-- request->request.op.request_id = 1;
-+ ippSetOperation( request, CUPS_SET_DEFAULT );
-+ ippSetRequestId ( request, 1 );
-
- language = cupsLangDefault();
-
-@@ -743,7 +783,7 @@ -
- response = cupsDoRequest( http, request, "/admin/" );
-
-- if ( ( response != NULL ) && ( response->request.status.status_code <= IPP_OK_CONFLICT ) )
-+ if ( ( response != NULL ) && ( ippGetStatusCode( response ) <= IPP_OK_CONFLICT ) )
- {
- r = 1;
- }
-@@ -797,8 +837,8 @@ -
- request = ippNew();
-
-- request->request.op.operation_id = op;
-- request->request.op.request_id = 1;
-+ ippSetOperation( request, op );
-+ ippSetRequestId ( request, 1 );
-
- language = cupsLangDefault();
-
-@@ -822,7 +862,7 @@ -
- response = cupsDoRequest(http, request, "/admin/");
-
-- if (( response != NULL ) && (response->request.status.status_code <= IPP_OK_CONFLICT))
-+ if (( response != NULL ) && (ippGetStatusCode( response ) <= IPP_OK_CONFLICT))
- {
- r = 1;
- }
-@@ -837,7 +877,7 @@ - if ( response != NULL )
- ippDelete( response );
-
-- return Py_BuildValue( "i", r );;
-+ return Py_BuildValue( "i", r );
- }
-
-
-@@ -1116,8 +1156,8 @@ -
- request = ippNew();
-
-- request->request.op.operation_id = CUPS_GET_PPDS;
-- request->request.op.request_id = 1;
-+ ippSetOperation( request, CUPS_GET_PPDS );
-+ ippSetRequestId ( request, 1 );
-
- language = cupsLangDefault();
-
-@@ -1143,43 +1183,43 @@ - if ((response = cupsDoRequest(http, request, "/")) != NULL)
- {
-
-- for (attr = response->attrs; attr; attr = attr->next)
-+ for (attr = ippFirstAttribute( response ); attr; attr = ippNextAttribute( response ))
- {
- PyObject *dict;
- char *ppdname = NULL;
-
-- while (attr && attr->group_tag != IPP_TAG_PRINTER)
-- attr = attr->next;
-+ while (attr && ippGetGroupTag( attr ) != IPP_TAG_PRINTER)
-+ attr = ippNextAttribute( response );
-
- if (!attr)
- break;
-
- dict = PyDict_New ();
-
-- for (; attr && attr->group_tag == IPP_TAG_PRINTER; attr = attr->next)
-+ for (; attr && ippGetGroupTag( attr ) == IPP_TAG_PRINTER; attr = ippNextAttribute( response ))
- {
- PyObject *val = NULL;
-
-- if (!strcmp (attr->name, "ppd-name") && attr->value_tag == IPP_TAG_NAME)
-+ if (!strcmp (ippGetName( attr ), "ppd-name") && ippGetValueTag( attr ) == IPP_TAG_NAME)
- {
-- ppdname = attr->values[0].string.text;
-+ ppdname = ippGetString( attr, 0, NULL );
-
- //sprintf( buf, "print '%s'", ppdname);
- //PyRun_SimpleString( buf );
- }
-
-- else if (attr->value_tag == IPP_TAG_TEXT || attr->value_tag == IPP_TAG_NAME || attr->value_tag == IPP_TAG_KEYWORD)
-- //else if ((!strcmp (attr->name, "ppd-natural-language") && attr->value_tag == IPP_TAG_LANGUAGE) ||
-- // (!strcmp (attr->name, "ppd-make-and-model") && attr->value_tag == IPP_TAG_TEXT) ||
-- // (!strcmp (attr->name, "ppd-make") && attr->value_tag == IPP_TAG_TEXT) ||
-- // (!strcmp (attr->name, "ppd-device-id") && attr->value_tag == IPP_TAG_TEXT))
-+ else if (ippGetValueTag( attr ) == IPP_TAG_TEXT || ippGetValueTag( attr ) == IPP_TAG_NAME || ippGetValueTag( attr ) == IPP_TAG_KEYWORD)
-+ //else if ((!strcmp (ippGetName( attr ), "ppd-natural-language") && ippGetValueTag( attr ) == IPP_TAG_LANGUAGE) ||
-+ // (!strcmp (ippGetName( attr ), "ppd-make-and-model") && ippGetValueTag( attr ) == IPP_TAG_TEXT) ||
-+ // (!strcmp (ippGetName( attr ), "ppd-make") && ippGetValueTag( attr ) == IPP_TAG_TEXT) ||
-+ // (!strcmp (ippGetName( attr ), "ppd-device-id") && ippGetValueTag( attr ) == IPP_TAG_TEXT))
- {
-- val = PyObj_from_UTF8(attr->values[0].string.text);
-+ val = PyObj_from_UTF8(ippGetString( attr, 0, NULL ));
- }
-
- if (val)
- {
-- PyDict_SetItemString (dict, attr->name, val);
-+ PyDict_SetItemString (dict, ippGetName( attr ), val);
- Py_DECREF (val);
- }
- }
-diff -Naur hplip-3.12.6_old/scan/sane/hpaio.c hplip-3.12.6/scan/sane/hpaio.c ---- hplip-3.12.6_old/scan/sane/hpaio.c 2012-08-04 09:18:21.458389913 +0200 -+++ hplip-3.12.6/scan/sane/hpaio.c 2012-08-04 09:18:27.875181720 +0200 -@@ -47,6 +47,43 @@ - #define DEBUG_DECLARE_ONLY - #include "sanei_debug.h" - -+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) -+#define HAVE_CUPS_1_6 1 -+#endif -+ -+#ifndef HAVE_CUPS_1_6 -+#define ippGetGroupTag(attr) attr->group_tag -+#define ippGetValueTag(attr) attr->value_tag -+#define ippGetName(attr) attr->name -+#define ippGetString(attr, element, language) attr->values[element].string.text -+ -+static ipp_attribute_t * ippFirstAttribute( ipp_t *ipp ) -+{ -+ if (!ipp) -+ return (NULL); -+ return (ipp->current = ipp->attrs); -+} -+ -+static ipp_attribute_t * ippNextAttribute( ipp_t *ipp ) -+{ -+ if (!ipp || !ipp->current) -+ return (NULL); -+ return (ipp->current = ipp->current->next); -+} -+ -+static int ippSetOperation( ipp_t *ipp, ipp_op_t op ) -+{ -+ ipp->request.op.operation_id = op; -+ return (1); -+} -+ -+static int ippSetRequestId( ipp_t *ipp, int request_id ) -+{ -+ ipp->request.any.request_id = request_id; -+ return (1); -+} -+#endif -+ - static SANE_Device **DeviceList = NULL; - - static int AddDeviceList(char *uri, char *model, SANE_Device ***pd) -@@ -186,8 +223,8 @@ - /* Assemble the IPP request */ - request = ippNew(); - -- request->request.op.operation_id = CUPS_GET_PRINTERS; -- request->request.any.request_id = 1; -+ ippSetOperation( request, CUPS_GET_PRINTERS ); -+ ippSetRequestId( request, 1 ); - - ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, "utf-8"); - ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, "en"); -@@ -197,20 +234,20 @@ - if ((response = cupsDoRequest(http, request, "/")) == NULL) - goto bugout; - -- for (attr = response->attrs; attr != NULL; attr = attr->next) -+ for (attr = ippFirstAttribute ( response ); attr != NULL; attr = ippNextAttribute( response )) - { - /* Skip leading attributes until we hit a printer. */ -- while (attr != NULL && attr->group_tag != IPP_TAG_PRINTER) -- attr = attr->next; -+ while (attr != NULL && ippGetGroupTag( attr ) != IPP_TAG_PRINTER) -+ attr = ippNextAttribute( response ); - - if (attr == NULL) - break; - -- while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER) -+ while (attr != NULL && ippGetGroupTag( attr ) == IPP_TAG_PRINTER) - { -- if (strcmp(attr->name, "device-uri") == 0 && attr->value_tag == IPP_TAG_URI && AddCupsList(attr->values[0].string.text, printer) == 0) -+ if (strcmp(ippGetName( attr ), "device-uri") == 0 && ippGetValueTag( attr ) == IPP_TAG_URI && AddCupsList(ippGetString( attr, 0, NULL ), printer) == 0) - cnt++; -- attr = attr->next; -+ attr = ippNextAttribute( response ); - } - - if (attr == NULL) diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip-3.12.6/fix-libusb-paths.patch b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip-3.12.6/fix-libusb-paths.patch deleted file mode 100644 index b347f831..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip-3.12.6/fix-libusb-paths.patch +++ /dev/null @@ -1,35 +0,0 @@ -Upstream-Status: Inappropriate [configuration] - -diff -rupN hplip-3.12.6_orig/configure.in hplip-3.12.6/configure.in ---- hplip-3.12.6_orig/configure.in 2012-06-18 20:44:24.000000000 +1000 -+++ hplip-3.12.6/configure.in 2012-08-16 13:40:07.259927650 +1000 -@@ -524,6 +524,8 @@ if test "$hpijs_only_build" = "no"; then - AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)]) - else - AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)]) -+ LIBUSBINCLUDEROOT?="/usr/include/" -+ AC_ARG_VAR(LIBUSBINCLUDEROOT, [path to libusb-1.0 folder]) - AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)]) - fi - fi -diff -rupN hplip-3.12.6_orig/Makefile.am hplip-3.12.6/Makefile.am ---- hplip-3.12.6_orig/Makefile.am 2012-06-18 20:44:13.000000000 +1000 -+++ hplip-3.12.6/Makefile.am 2012-08-16 13:41:12.307932822 +1000 -@@ -72,7 +72,7 @@ libhpmud_la_SOURCES = io/hpmud/hpmud.c i - io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \ - io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb_libusb01.c - else --libhpmud_la_CFLAGS = -I/usr/include/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\" -+libhpmud_la_CFLAGS = -I/$(LIBUSBINCLUDEROOT)/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\" - libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/pml.c \ - io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \ - io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb.c -@@ -286,7 +286,7 @@ hpmudext_la_LIBADD = libhpmud.la - if LIBUSB01_BUILD - hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR) - else --hpmudext_la_CFLAGS =-I/usr/include/libusb-1.0 -I$(PYTHONINCLUDEDIR) -+hpmudext_la_CFLAGS =-I$(LIBUSBINCLUDEROOT)/libusb-1.0 -I$(PYTHONINCLUDEDIR) - endif - - # ui (qt3) diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip-3.12.6/setup-add-sleep-after-cups-reset.patch b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip-3.12.6/setup-add-sleep-after-cups-reset.patch deleted file mode 100644 index 0e1b6c4e..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip-3.12.6/setup-add-sleep-after-cups-reset.patch +++ /dev/null @@ -1,12 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - ---- hplip-3.11.10/setup.py.orig 2011-10-02 14:06:19.000000000 +1100 -+++ hplip-3.11.10/setup.py 2012-02-29 08:21:39.167999938 +1100 -@@ -573,6 +573,7 @@ - - log.debug("Restarting CUPS...") - status, output = utils.run(restart_cups()) -+ time.sleep(3) - log.debug("Restart CUPS returned: exit=%d output=%s" % (status, output)) - - cups.setPasswordPrompt("You do not have permission to add a printer.") diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/030-replace_unsafe_memcpy_with_memmove.patch b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/030-replace_unsafe_memcpy_with_memmove.patch new file mode 100644 index 00000000..2babb2b6 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/030-replace_unsafe_memcpy_with_memmove.patch @@ -0,0 +1,15 @@ +https://bugs.launchpad.net/hplip/+bug/1672256 + +memcpy should never be used with overlapping memory regions + +--- a/io/hpmud/musb.c ++++ b/io/hpmud/musb.c +@@ -775,7 +775,7 @@ static int device_id(int fd, unsigned ch + len = size-1; /* leave byte for zero termination */ + if (len > 2) + len -= 2; +- memcpy(buffer, buffer+2, len); /* remove length */ ++ memmove(buffer, buffer+2, len); /* remove length */ + buffer[len]=0; + DBG("read actual device_id successfully fd=%d len=%d\n", fd, len); + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/050-fix-glibcisms.patch b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/050-fix-glibcisms.patch new file mode 100644 index 00000000..e020bd46 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/050-fix-glibcisms.patch @@ -0,0 +1,17 @@ +diff --git a/scan/sane/OrbliteScan/LinuxCommon.h b/scan/sane/OrbliteScan/LinuxCommon.h +index 6605dd9..55c7110 100644 +--- a/scan/sane/OrbliteScan/LinuxCommon.h ++++ b/scan/sane/OrbliteScan/LinuxCommon.h +@@ -18,10 +18,8 @@ typedef u_int32_t UInt32; + typedef int32_t SInt32;
+ //typedef unsigned long UInt32;
+ //typedef signed long SInt32;
+-typedef __S64_TYPE SInt64;
+-typedef __U64_TYPE UInt64;
+-typedef __S64_TYPE int64_t;
+-typedef __U64_TYPE uint64_t;
++typedef int64_t SInt64;
++typedef uint64_t UInt64;
+
+ //typedef unsigned long ULONG;
+ //typedef void* LPVOID;
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/600-fix.patch b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/600-fix.patch new file mode 100644 index 00000000..91a5035a --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/600-fix.patch @@ -0,0 +1,10 @@ +--- a/configure.in ++++ b/configure.in +@@ -254,7 +254,6 @@ if test "$class_driver" = "yes"; then + test `sh ./createPPD.sh -f` == 0 + else + AC_MSG_RESULT(no) +- test `sh ./createPPD.sh -q` == 0 + fi + AM_CONDITIONAL(HPLIP_CLASS_DRIVER, test x$class_driver = xyes) + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/999-remove-lImageProcessor.patch b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/999-remove-lImageProcessor.patch new file mode 100644 index 00000000..aee4ac50 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/999-remove-lImageProcessor.patch @@ -0,0 +1,69 @@ +# ../bin/ld: cannot find -lImageProcessor +--- a/Makefile.am ++++ b/Makefile.am +@@ -590,11 +590,10 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilte + prnt/hpcups/flate_colorspace.h prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \ + prnt/hpcups/genPCLm.h \ + common/utils.c common/utils.h prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \ +- prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \ +- prnt/hpcups/ImageProcessor.h ++ prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp + + hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS) +-hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS) ++hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS) + #else + #hpcupsdir = $(cupsfilterdir) + #hpcups_PROGRAMS = hpcups +--- a/prnt/hpcups/HPCupsFilter.cpp ++++ b/prnt/hpcups/HPCupsFilter.cpp +@@ -637,16 +637,10 @@ int HPCupsFilter::processRasterData(cups + + + sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name); +- image_processor_t* imageProcessor = imageProcessorCreate(); + + while (cupsRasterReadHeader2(cups_raster, &cups_header)) + { + +- IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header); +- if (result != IPE_SUCCESS){ +- dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result); +- } +- + current_page_number++; + + if (current_page_number == 1) { +@@ -745,11 +739,6 @@ int HPCupsFilter::processRasterData(cups + color_raster = rgbRaster; + black_raster = kRaster; + +- result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine); +- if (result != IPE_SUCCESS){ +- dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result); +- } +- + + if ((y == 0) && !is_ljmono) { + //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer +@@ -780,11 +769,6 @@ int HPCupsFilter::processRasterData(cups + } + } // for() loop end + +- result = imageProcessorEndPage(imageProcessor); +- if (result != IPE_SUCCESS){ +- dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result); +- } +- + + m_Job.NewPage(); + if (err != NO_ERROR) { +@@ -800,8 +784,6 @@ int HPCupsFilter::processRasterData(cups + rgbRaster = NULL; + } + +- imageProcessorDestroy(imageProcessor); +- + unlink(hpPreProcessedRasterFile); + return ret_status; + } diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/configure.patch b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/configure.patch new file mode 100644 index 00000000..8fe77c5e --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/configure.patch @@ -0,0 +1,12 @@ +--- a/configure.in ++++ b/configure.in +@@ -27,8 +27,7 @@ + + #AC_PREREQ(2.59) + AC_INIT([HP Linux Imaging and Printing], [3.19.12], [3.19.12], [hplip]) +-#AM_INIT_AUTOMAKE([1.9 foreign]) +-AM_INIT_AUTOMAKE ++AM_INIT_AUTOMAKE([foreign]) + AC_DISABLE_STATIC + + # Checks for programs. diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch new file mode 100644 index 00000000..6aa1de0a --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch @@ -0,0 +1,33 @@ +Upstream-Status: Inappropriate [configuration] + +--- a/configure.in ++++ b/configure.in +@@ -599,6 +599,8 @@ if test "$class_driver" = "no" && test " + AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)]) + else + AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)]) ++ LIBUSBINCLUDEROOT?="/usr/include/" ++ AC_ARG_VAR(LIBUSBINCLUDEROOT, [path to libusb-1.0 folder]) + AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)]) + fi + fi +--- a/Makefile.am ++++ b/Makefile.am +@@ -109,7 +109,7 @@ libhpmud_la_SOURCES += io/hpmud/musb_lib + libhpmud_la_LDFLAGS += -lusb + else + libhpmud_la_SOURCES += io/hpmud/musb.c +-libhpmud_la_CFLAGS += -I/usr/include/libusb-1.0 ++libhpmud_la_CFLAGS += -I$(LIBUSBINCLUDEROOT)/libusb-1.0 + libhpmud_la_LDFLAGS += -lusb-1.0 + endif + +@@ -362,7 +362,7 @@ hpmudext_la_CFLAGS += -Iprotocol/discove + endif + + if !LIBUSB01_BUILD +-hpmudext_la_CFLAGS +=-I/usr/include/libusb-1.0 ++hpmudext_la_CFLAGS +=-I$(LIBUSBINCLUDEROOT)/libusb-1.0 + endif + endif #!HPLIP_CLASS_DRIVER + # ui (qt3) diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/hplip-3.19.6-fix-return.patch b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/hplip-3.19.6-fix-return.patch new file mode 100644 index 00000000..67546b07 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip/hplip-3.19.6-fix-return.patch @@ -0,0 +1,20 @@ +From 2fcd0e79b21ec6dbf975ad7d1b5697a78993e2f1 Mon Sep 17 00:00:00 2001 +From: David Valleau <valleau@chromium.org> +Date: Wed, 14 Aug 2019 15:47:38 -0700 +Subject: [PATCH] Fixing invalid return in void function + +--- + prnt/hpps/hppsfilter.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/prnt/hpps/hppsfilter.c ++++ b/prnt/hpps/hppsfilter.c +@@ -104,7 +104,7 @@ static void open_tempbookletfile(char *m + if(ptempbooklet_file == NULL) + { + fprintf(stderr, "ERROR: Unable to open temp file %s\n", temp_filename); +- return 1; ++ return; + } + chmod(temp_filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip_3.12.6.bb b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip_3.12.6.bb deleted file mode 100644 index 1f1e80ce..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip_3.12.6.bb +++ /dev/null @@ -1,74 +0,0 @@ -SUMMARY = "HP Linux Imaging and Printing" -LICENSE="GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=442bb3cbbeeb60643a87325718b8a8ee" - -PR = "r1" - -SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ - file://setup-add-sleep-after-cups-reset.patch \ - file://fix-libusb-paths.patch \ - file://cups-1.6.patch \ - file://configure.patch \ - file://0001-include-cups-ppd.h-for-missing-ppd-definitions.patch \ -" - -DEPENDS += "cups python libusb" - -inherit autotools-brokensep python-dir pythonnative pkgconfig - -export STAGING_INCDIR -export STAGING_LIBDIR - -EXTRA_OECONF += "\ - LIBUSBINCLUDEROOT=${STAGING_INCDIR} \ - --disable-network-build \ - --disable-doc-build \ - --disable-pp-build \ - --disable-scan-build \ - --disable-gui-build \ - --disable-fax-build \ - --disable-policykit \ - --disable-qt4 \ - --disable-qt3 \ - --disable-dbus-build \ - --disable-foomatic-drv-install \ - --enable-foomatic-ppd-install \ - --enable-foomatic-rip-hplip-install \ - --with-cupsbackenddir=${libdir}/cups/backend \ - --with-cupsfilterdir=${libdir}/cups/filter \ -" - -PACKAGES += "${PN}-ppd ${PN}-cups ${PN}-backend ${PN}-filter ${PN}-hal" - -RDEPENDS_${PN} += " \ - python-syslog \ - python-pprint \ - python-compression \ - python-shell \ - python-xml \ - python-unixadmin \ - python-html \ - python-resource \ - python-terminal \ - python-subprocess\ -" -RDEPENDS_${PN}-filter += "perl" - -# need to snag the debug file or OE will fail on backend package -FILES_${PN}-dbg += "\ - ${libdir}/cups/backend/.debug \ - ${PYTHON_SITEPACKAGES_DIR}/.debug \ - ${libdir}/cups/filter/.debug " - -FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" -FILES_${PN}-ppd = "${datadir}/ppd" -FILES_${PN}-cups = "${datadir}/cups" -FILES_${PN}-backend = "${libdir}/cups/backend" -FILES_${PN}-filter = "${libdir}/cups/filter" -FILES_${PN}-hal = "${datadir}/hal" - -FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/*.so" - -SRC_URI[md5sum] = "5303938e8630775ea6fb383af85775e5" -SRC_URI[sha256sum] = "54578000792969adb583e75efeacb9c46ab69659ec7e9424de390613f3595775" - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip_3.19.12.bb b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip_3.19.12.bb new file mode 100644 index 00000000..883a6ffe --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/hplip/hplip_3.19.12.bb @@ -0,0 +1,88 @@ +SUMMARY = "HP Linux Imaging and Printing" +LICENSE="GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=20f2c819499cc2063e9a7b07b408815c" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ + file://configure.patch \ + file://fix-libusb-paths.patch \ + file://999-remove-lImageProcessor.patch \ + file://600-fix.patch \ + file://030-replace_unsafe_memcpy_with_memmove.patch \ + file://050-fix-glibcisms.patch \ + file://hplip-3.19.6-fix-return.patch \ +" +SRC_URI[md5sum] = "d72bc77d791c150c2c22b84e9553bab3" +SRC_URI[sha256sum] = "b7f398502fb659e0de8e54976237e3c6a64fec0b3c36054a515876f7b006b255" + +DEPENDS += "cups python3 libusb" + +inherit autotools-brokensep python3-dir python3native pkgconfig systemd + +export STAGING_INCDIR +export STAGING_LIBDIR + +CFLAGS += "-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}" + +EXTRA_OECONF += "\ + LIBUSBINCLUDEROOT=${STAGING_INCDIR} \ + --enable-cups-ppd-install \ + --disable-network-build \ + --disable-doc-build \ + --disable-pp-build \ + --disable-scan-build \ + --disable-gui-build \ + --disable-fax-build \ + --disable-policykit \ + --disable-qt4 \ + --disable-qt3 \ + --disable-dbus-build \ + --enable-foomatic-drv-install \ + --disable-foomatic-ppd-install \ + --disable-foomatic-rip-hplip-install \ + --with-cupsbackenddir=${libdir}/cups/backend \ + --with-cupsfilterdir=${libdir}/cups/filter \ +" + +EXTRA_OEMAKE = "rulessystemdir=${systemd_unitdir}/system/" + +do_install_append() { + rm -rf ${D}${datadir}/hplip/upgrade.py + rm -rf ${D}${datadir}/hplip/uninstall.py + sed -i -e "s|/usr/bin/env python|/usr/bin/env python3|g" ${D}${datadir}/hplip/*.py + sed -i -e "s|/usr/bin/python|/usr/bin/env python3|g" ${D}${datadir}/hplip/*.py +} + +PACKAGES += "${PN}-ppd ${PN}-cups ${PN}-backend ${PN}-filter ${PN}-hal" + +RDEPENDS_${PN} += " \ + python3\ + python3-syslog \ + python3-pprint \ + python3-compression \ + python3-shell \ + python3-xml \ + python3-unixadmin \ + python3-html \ + python3-resource \ + python3-terminal \ +" +RDEPENDS_${PN}-filter += "perl" + +# need to snag the debug file or OE will fail on backend package +FILES_${PN}-dbg += "\ + ${libdir}/cups/backend/.debug \ + ${PYTHON_SITEPACKAGES_DIR}/.debug \ + ${libdir}/cups/filter/.debug " + +FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" +FILES_${PN}-ppd = "${datadir}/ppd" +FILES_${PN}-cups = "${datadir}/cups" +FILES_${PN}-backend = "${libdir}/cups/backend" +FILES_${PN}-filter = "${libdir}/cups/filter" +FILES_${PN}-hal = "${datadir}/hal" + +FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/*.so" + +SYSTEMD_SERVICE_${PN} = "hplip-printer@.service" + +CLEANBROKEN = "1" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/hwloc/hwloc_1.11.10.bb b/external/meta-openembedded/meta-oe/recipes-extended/hwloc/hwloc_1.11.13.bb index 5f4155ea..2b0dfe4e 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/hwloc/hwloc_1.11.10.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/hwloc/hwloc_1.11.13.bb @@ -4,12 +4,12 @@ DESCRIPTION = "The Portable Hardware Locality (hwloc) software package \ architectures." HOMEPAGE = "https://www.open-mpi.org/software/hwloc/" SECTION = "base" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=3282e20dc3cec311deda3c6d4b1f990b" SRC_URI = "https://www.open-mpi.org/software/${BPN}/v1.11/downloads/${BP}.tar.bz2" -SRC_URI[md5sum] = "0981a01935982aa7e850a96e0c3057b0" -SRC_URI[sha256sum] = "2be808383d8337846fe77ce49c7ad3336fb6857505494d85c0ac03f22c5bd1e7" +SRC_URI[md5sum] = "3c792e23c209e9e1bafe9bdbc613d401" +SRC_URI[sha256sum] = "a4494b7765f517c0990d1c7f09d98cb87755bb6b841e4e2cbfebca1b14bac9c8" UPSTREAM_CHECK_URI = "https://www.open-mpi.org/software/hwloc/v1.11/" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/icewm/icewm/0001-configure.ac-skip-running-test-program-when-cross-co.patch b/external/meta-openembedded/meta-oe/recipes-extended/icewm/icewm/0001-configure.ac-skip-running-test-program-when-cross-co.patch new file mode 100644 index 00000000..79439485 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/icewm/icewm/0001-configure.ac-skip-running-test-program-when-cross-co.patch @@ -0,0 +1,37 @@ +From c2a67c1f62175ab061bc03d10dd766f968c6a097 Mon Sep 17 00:00:00 2001 +From: Naveen Saini <naveen.kumar.saini@intel.com> +Date: Fri, 2 Aug 2019 10:41:26 +0800 +Subject: [PATCH] configure.ac: skip running test program when cross-compiling + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c5e3ca03..4b89396a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -140,7 +140,7 @@ AC_CHECK_FUNC([getloadavg],[AC_DEFINE([HAVE_GETLOADAVG2], 1, [getloadavg() is av + AC_FUNC_SELECT_ARGTYPES + + AC_MSG_CHECKING([for strlcpy]) +-AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]],[[ ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]],[[ + char a[2]; + if (strlcpy(a, "yes", 2) != 3) + return 1;]])], +@@ -156,7 +156,7 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]],[[ + ]) + + AC_MSG_CHECKING([for strlcat]) +-AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]],[[ ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]],[[ + char a[4] = "no"; + if (strlcat(a, "yes", 4) != 5) + return 1;]])], +-- +2.17.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_1.6.5.bb b/external/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_1.6.5.bb new file mode 100644 index 00000000..241a2b30 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_1.6.5.bb @@ -0,0 +1,46 @@ +DESCRIPTION = "Ice Window Manager (IceWM)" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=4a26952467ef79a7efca4a9cf52d417b" + +SRC_URI = "https://github.com/ice-wm/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.lz \ + file://0001-configure.ac-skip-running-test-program-when-cross-co.patch \ + " +SRC_URI[sha256sum] = "d41e6abf842ff3f8705a81d352be7c5b181c587549c183de0641c3820234a7b2" + +UPSTREAM_CHECK_URI = "https://github.com/ice-wm/${BPN}/releases" + +inherit autotools pkgconfig gettext perlnative features_check qemu update-alternatives +REQUIRED_DISTRO_FEATURES = "x11" + +EXTRA_OECONF += "--with-libdir=${datadir}/icewm \ + --with-cfgdir=${sysconfdir}/icewm \ + --with-docdir=${docdir}/icewm \ + --enable-fribidi \ + --enable-xinerama \ + --enable-shape" + +DEPENDS = "asciidoc-native fontconfig gdk-pixbuf libxft libxpm libxrandr \ + libxinerama libice libsm libx11 libxext libxrender libxcomposite libxdamage \ + libxfixes" +DEPENDS_append = " qemu-native" +RDEPENDS_${PN} = "perl fribidi" + +do_compile_prepend_class-target() { + + cd ${B} + oe_runmake -C src genpref + + qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}',['${B}/src/.libs','${STAGING_DIR_TARGET}/${libdir}','${STAGING_DIR_TARGET}/${base_libdir}'])}" + cat >qemuwrapper <<EOF +#!/bin/sh +${qemu_binary} src/genpref "\$@" +EOF + chmod +x qemuwrapper + ./qemuwrapper > src/preferences +} + +ALTERNATIVE_${PN} = "x-session-manager" +ALTERNATIVE_TARGET[x-session-manager] = "${bindir}/icewm-session" +ALTERNATIVE_PRIORITY_${PN} = "100" + +FILES_${PN} += "${datadir}/xsessions" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/indent/indent/0001-Fix-builds-with-recent-gettext.patch b/external/meta-openembedded/meta-oe/recipes-extended/indent/indent/0001-Fix-builds-with-recent-gettext.patch new file mode 100644 index 00000000..e9dadace --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/indent/indent/0001-Fix-builds-with-recent-gettext.patch @@ -0,0 +1,32 @@ +From 3349812de0598ca7722e0b7c7b7e5d48bd79bea9 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Fri, 20 Dec 2019 14:01:18 +0100 +Subject: [PATCH] Fix builds with recent gettext + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,7 +1,7 @@ + ## Process this file with automake to produce Makefile.in + AUTOMAKE_OPTIONS = no-texinfo.tex + +-SUBDIRS = intl src doc po man ++SUBDIRS = src po man + + BUILT_SOURCES = + +--- a/configure.ac ++++ b/configure.ac +@@ -58,7 +58,6 @@ fi + AC_HEADER_DIRENT + + AC_OUTPUT([ +- intl/Makefile + po/Makefile.in + Makefile + src/Makefile diff --git a/external/meta-openembedded/meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch b/external/meta-openembedded/meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch new file mode 100644 index 00000000..357d77d8 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch @@ -0,0 +1,67 @@ +From 27bda5ee884e79d6d0e76955124d2b0c5798d6cf Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Mon, 25 Feb 2019 00:34:17 -0800 +Subject: [PATCH] Makefile.am: remove regression dir + +Remove regression dir to fix below do_compile +error: +| Making all in regression +| /bin/sh: line 20: cd: regression: No such file or directory +| Makefile:451: recipe for target 'all-recursive' failed + +BTW, it should be safe not to cover regression dir +as there is no Makefile.in under ${S}/regression +and the content of ${S}/regression/Makefile as below. +------------------------------------- +all: + +install: + +check: + ./TEST + +distclean: clean + +maintainer-clean: clean + +distdir: + +clean: + @rm -rf output + +.PHONY: all install +------------------------------------- + +Upstream-Status: Pending + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + Makefile.am | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index ba37a42..548fea7 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,7 +1,7 @@ + ## Process this file with automake to produce Makefile.in + AUTOMAKE_OPTIONS = no-texinfo.tex + +-SUBDIRS = intl src doc po man regression ++SUBDIRS = intl src doc po man + + BUILT_SOURCES = + +@@ -13,8 +13,7 @@ EXTRA_DIST = README.md \ + aclocal/UTIMBUF.m4 \ + miscel/Makefile.mingw32 \ + miscel/README.vc++ \ +- bootstrap \ +- regression ++ bootstrap + + DISTCLEANFILES=config/config.cache config/config.log config.h + +-- +2.17.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch b/external/meta-openembedded/meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch new file mode 100644 index 00000000..7df7ecb3 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch @@ -0,0 +1,40 @@ +From 75369ce004ec0f5e46a432fa1dac8cfc7ae1ef8d Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Sun, 24 Feb 2019 22:35:08 -0800 +Subject: [PATCH] src/indent.c: correct the check for locale.h + +Adjust to check HAVE_LC_MESSAGES or HAVE_LOCALE_H +to determine whether include locale.h or not to +fix below issue: + +| ../../indent-2.2.12/src/indent.c: In function 'main': +| ../../indent-2.2.12/src/indent.c:1062:5: error: implicit declaration of function 'setlocale'; did you mean 'setstate'? [-Werror=implicit-function-declaration] +| setlocale(LC_ALL, ""); +| ^~~~~~~~~ +| setstate +| ../../indent-2.2.12/src/indent.c:1062:5: error: nested extern declaration of 'setlocale' [-Werror=nested-externs] +| ../../indent-2.2.12/src/indent.c:1062:15: error: 'LC_ALL' undeclared (first use in this function) + +Upstream-Status: Pending + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + src/indent.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/indent.c b/src/indent.c +index 4d666e2..0c2780b 100644 +--- a/src/indent.c ++++ b/src/indent.c +@@ -71,7 +71,7 @@ + #include <string.h> + #include <ctype.h> + #include <stdlib.h> +-#ifdef HAVE_LOCALE_H ++#if defined(HAVE_LC_MESSAGES) || defined(HAVE_LOCALE_H) + #include <locale.h> + #endif + #include "indent.h" +-- +2.17.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/indent/indent_2.2.10.bb b/external/meta-openembedded/meta-oe/recipes-extended/indent/indent_2.2.12.bb index d25e8e31..90ba8a2e 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/indent/indent_2.2.10.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/indent/indent_2.2.12.bb @@ -9,14 +9,19 @@ Install the indent package if you are developing applications in C and \ you want a program to format your code." LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + DEPENDS = "virtual/gettext" -SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz" -SRC_URI[md5sum] = "be35ea62705733859fbf8caf816d8959" -SRC_URI[sha256sum] = "8a9b41be5bfcab5d8c1be74204b10ae78789fc3deabea0775fdced8677292639" +SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ + file://0001-src-indent.c-correct-the-check-for-locale.h.patch \ + file://0001-Makefile.am-remove-regression-dir.patch \ + file://0001-Fix-builds-with-recent-gettext.patch \ + " +SRC_URI[md5sum] = "4764b6ac98f6654a35da117b8e5e8e14" +SRC_URI[sha256sum] = "e77d68c0211515459b8812118d606812e300097cfac0b4e9fb3472664263bb8b" -inherit autotools gettext +inherit autotools gettext texinfo -FILES_${PN}-doc += "/usr/doc/indent/indent.html" +CFLAGS_append_class-native = " -Wno-error=unused-value" BBCLASSEXTEND = "native" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/iotop/iotop_0.6.bb b/external/meta-openembedded/meta-oe/recipes-extended/iotop/iotop_0.6.bb index 94643cd2..3a597218 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/iotop/iotop_0.6.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/iotop/iotop_0.6.bb @@ -4,24 +4,26 @@ DESCRIPTION = "iotop does for I/O usage what top(1) does for CPU usage. \ a table of current I/O usage by processes on the system." HOMEPAGE = "http://guichaz.free.fr/iotop/" - LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4" -SRC_URI = "http://guichaz.free.fr/iotop/files/${BP}.tar.bz2" -SRC_URI[md5sum] = "5ef9456b26d7694abf3101a72e1e0d1d" -SRC_URI[sha256sum] = "3adea2a24eda49bbbaeb4e6ed2042355b441dbd7161e883067a02bfc8dcef75b" +PV .= "+git${SRCPV}" + +SRCREV = "1bfb3bc70febb1ffb95146b6dcd65257228099a3" +SRC_URI = "git://repo.or.cz/iotop.git" + +S = "${WORKDIR}/git" UPSTREAM_CHECK_URI = "http://repo.or.cz/iotop.git/tags" UPSTREAM_CHECK_REGEX = "iotop-(?P<pver>\d+(\.\d+)+)" -inherit distutils +inherit distutils3 do_install_append() { rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.pyo || true rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py || true } -RDEPENDS_${PN} = "python-curses python-textutils \ - python-codecs python-ctypes python-pprint \ - python-shell python-subprocess" +RDEPENDS_${PN} = "python3-curses \ + python3-codecs python3-ctypes python3-pprint \ + python3-shell python3-core" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.3.bb b/external/meta-openembedded/meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.3.bb index 83e83858..b7899a11 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.3.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.3.bb @@ -2,7 +2,7 @@ SUMMARY = "Tools for taking the MD5 sum of ISO images" DESCRIPTION = "Tools for taking the MD5 sum of ISO images" DEPENDS = "popt python3 openssl curl popt-native" -RDEPENDS_${PN} = "openssl curl" +RDEPENDS_${BPN} = "openssl curl" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" @@ -25,11 +25,11 @@ do_install () { oe_runmake install } -PACKAGES += "${PYTHON_PN}-${PN}" +PACKAGES += "${PYTHON_PN}-${BPN}" -RPROVIDES_${PN}-dbg += "${PYTHON_PN}-${PN}-dbg" +RPROVIDES_${BPN}-dbg += "${PYTHON_PN}-${BPN}-dbg" -FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}/pyisomd5sum.so" +FILES_${PYTHON_PN}-${BPN} = "${PYTHON_SITEPACKAGES_DIR}/pyisomd5sum.so" SRCREV = "7860901f726f5d92689cb67243cc7f981f21f74b" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/jansson/jansson_2.11.bb b/external/meta-openembedded/meta-oe/recipes-extended/jansson/jansson_2.11.bb deleted file mode 100644 index 370fa224..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/jansson/jansson_2.11.bb +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "Jansson is a C library for encoding, decoding and manipulating JSON data" -HOMEPAGE = "http://www.digip.org/jansson/" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=8b70213ec164c7bd876ec2120ba52f61" - -SRC_URI = "http://www.digip.org/jansson/releases/${BPN}-${PV}.tar.gz" - -SRC_URI[md5sum] = "7af071db9970441e1eaaf25662310e33" -SRC_URI[sha256sum] = "6e85f42dabe49a7831dbdd6d30dca8a966956b51a9a50ed534b82afc3fa5b2f4" - -inherit autotools pkgconfig - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/jansson/jansson_2.13.1.bb b/external/meta-openembedded/meta-oe/recipes-extended/jansson/jansson_2.13.1.bb new file mode 100644 index 00000000..d6e56ea7 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/jansson/jansson_2.13.1.bb @@ -0,0 +1,14 @@ +SUMMARY = "Jansson is a C library for encoding, decoding and manipulating JSON data" +HOMEPAGE = "http://www.digip.org/jansson/" +BUGTRACKER = "https://github.com/akheron/jansson/issues" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=afd92c4cfc08f4896003251b878cc0bf" + +SRC_URI = "http://www.digip.org/jansson/releases/${BPN}-${PV}.tar.gz" + +SRC_URI[md5sum] = "570af45b8203e95876d71fecd56cee20" +SRC_URI[sha256sum] = "f4f377da17b10201a60c1108613e78ee15df6b12016b116b6de42209f47a474f" + +inherit autotools pkgconfig + +BBCLASSEXTEND = "native" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/jpnevulator/jpnevulator_git.bb b/external/meta-openembedded/meta-oe/recipes-extended/jpnevulator/jpnevulator_git.bb new file mode 100644 index 00000000..50dd74b6 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/jpnevulator/jpnevulator_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "A handy serial sniffer" +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a" + +PV = "2.3.5+git${SRCPV}" + +SRC_URI = "git://github.com/snarlistic/jpnevulator.git;protocol=http" +SRCREV = "c2d857091c0dfed05139ac07ea9b0f36ad259638" + +S = "${WORKDIR}/git" + +do_compile() { + oe_runmake +} + +do_install() { + oe_runmake install 'DESTDIR=${D}' +} + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb b/external/meta-openembedded/meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb index f62cf6ba..e6d5663f 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb @@ -6,7 +6,7 @@ implementations for many of the provider operations." HOMEPAGE = "https://github.com/rnovacek/konkretcmpi" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=f673270bfc350d9ce1efc8724c6c1873" -DEPENDS_append_class-target = " swig-native sblim-cmpi-devel python" +DEPENDS_append_class-target = " swig-native sblim-cmpi-devel python3" DEPENDS_append_class-native = " cmpi-bindings-native" SRC_URI = "git://github.com/rnovacek/konkretcmpi.git \ @@ -34,6 +34,6 @@ PACKAGES =+ "${PN}-python" RPROVIDES_${PN}-dbg += "${PN}-python-dbg" -FILES_${PN}-python = "${libdir}/python2.7/site-packages/konkretmof.py* ${libdir}/python2.7/site-packages/_konkretmof.so" +FILES_${PN}-python = "${libdir}/python*/site-packages/konkretmof.py* ${libdir}/python*/site-packages/_konkretmof.so" BBCLASSEXTEND = "native" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/lcdproc/lcdproc_git.bb b/external/meta-openembedded/meta-oe/recipes-extended/lcdproc/lcdproc_git.bb deleted file mode 100644 index 93a09f28..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/lcdproc/lcdproc_git.bb +++ /dev/null @@ -1,100 +0,0 @@ -DESCRIPTION = "LCDproc is a client/server suite to drive all kinds of LCD (-like) devices. The client \ -shipped with this package can be used to acquire various kinds of system stats." -SUMMARY = "Drivers for character-based LCD displays" -HOMEPAGE = "http://lcdproc.org" -SECTION = "utils" -LICENSE = "GPLv2+" -DEPENDS = "ncurses lirc" - -LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760 \ - file://README.md;beginline=107;md5=5c927ce1742d6d5cddc45b7ad6230f75" - -BASEPV = "0.5.9" -PV = "${BASEPV}+git${SRCPV}" -SRCREV = "a4b5a7e058fdd0d914a61138748b589c0128b45b" -SRC_URI = "git://github.com/lcdproc/lcdproc \ - " - -S = "${WORKDIR}/git" - -inherit autotools pkgconfig update-rc.d - -COMPATIBLE_HOST_arm_libc-musl = "null" - -LCD_DRIVERS ?= "all,!irman,!svga" -LCD_DEFAULT_DRIVER ?= "curses" - -PACKAGECONFIG ??= "usb" -PACKAGECONFIG[usb] = "--enable-libusb,--disable-libusb,virtual/libusb0" -PACKAGECONFIG[ftdi] = "--enable-libftdi,--disable-libftdi,libftdi" -PACKAGECONFIG[g15] = ",,libg15 g15daemon libg15render," -PACKAGECONFIG[hid] = "--enable-libhid,--disable-libhid,libhid" -PACKAGECONFIG[png] = "--enable-libpng,--disable-libpng,libpng" - -LCD_DRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'g15', '', ',!g15', d)}" - -EXTRA_OECONF = "--enable-drivers='${LCD_DRIVERS}'" - -do_install () { - # binaries - install -D -m 0755 server/LCDd ${D}${sbindir}/LCDd - install -D -m 0755 clients/lcdproc/lcdproc ${D}${bindir}/lcdproc - - # init scripts - install -d ${D}${sysconfdir}/init.d - # so far, not fixed :-( and now even uglier :-(( - cat scripts/init-LCDd.debian | sed -e s'/--oknodo//' -e 's/ -s -f / -s 1 -f 1 /' -e 's/force-reload/force-restart/' -e 's/sleep 1/sleep 4/' > ${D}${sysconfdir}/init.d/lcdd - chmod 0755 ${D}${sysconfdir}/init.d/lcdd - install -m 0755 scripts/init-lcdproc.debian ${D}${sysconfdir}/init.d/lcdproc - sed -i s'/--oknodo//' ${D}${sysconfdir}/init.d/lcdproc - - # configuration files - install -m 0644 ${S}/LCDd.conf ${D}${sysconfdir}/LCDd.conf - sed -i 's!^DriverPath=.*!DriverPath=${libdir}/lcdproc/!' ${D}${sysconfdir}/LCDd.conf - sed -i 's!^Driver=.*!Driver=${LCD_DEFAULT_DRIVER}!' ${D}${sysconfdir}/LCDd.conf - install -m 0644 ${S}/clients/lcdproc/lcdproc.conf ${D}${sysconfdir}/lcdproc.conf - - # driver library files - install -d ${D}${libdir}/lcdproc - for i in server/drivers/*.so; do - install -m 0644 $i ${D}${libdir}/lcdproc/ - done - # binaries - install -D -m 0755 clients/lcdvc/lcdvc ${D}${sbindir}/lcdvc - - # configuration files - install -D -m 0644 ${S}/clients/lcdvc/lcdvc.conf ${D}${sysconfdir}/lcdvc.conf -} - -PACKAGES =+ "lcdd lcdvc" - -RRECOMMENDS_${PN} = "lcdd" - -FILES_lcdd = "${sysconfdir}/LCDd.conf \ - ${sbindir}/LCDd \ - ${sysconfdir}/init.d/lcdd" - -CONFFILES_lcdd = "${sysconfdir}/LCDd.conf" -CONFFILES_${PN} = "${sysconfdir}/lcdproc.conf" -CONFFILES_lcdvc = "${sysconfdir}/lcdvc.conf" -FILES_lcdvc = "${sysconfdir}/lcdvc.conf ${sbindir}/lcdvc" - -# Driver packages - -# USB / no USB trickery - -RCONFLICTS_lcdd-driver-hd47780nousb = "lcdd-driver-hd44780" -RCONFLICTS_lcdd-driver-hd47780 = "lcdd-driver-hd44780nousb" - -INITSCRIPT_PACKAGES = "lcdd lcdproc" -INITSCRIPT_NAME_lcdd = "lcdd" -INITSCRIPT_NAME_lcdproc = "lcdproc" -INITSCRIPT_PARAMS_lcdd = "defaults 70 21" -INITSCRIPT_PARAMS_lcdproc = "defaults 71 20" - -python populate_packages_prepend() { - plugindir = d.expand('${libdir}/lcdproc') - do_split_packages(d, plugindir, '(.*)\.so$', 'lcdd-driver-%s', 'LCDd driver for %s', prepend=True) -} - -PACKAGES_DYNAMIC += "^lcdd-driver-.*" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_2.18.bb b/external/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_2.24.bb index 35f0cc06..99cdee5b 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_2.18.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/libblockdev/libblockdev_2.24.bb @@ -8,20 +8,17 @@ SECTION = "devel/lib" LIC_FILES_CHKSUM = "file://LICENSE;md5=c07cb499d259452f324bb90c3067d85c" -inherit autotools python3native gobject-introspection - -SRCREV = "0debeb45562ac3d8f6f43f6f942b238abab55be9" -SRC_URI = " \ - git://github.com/rhinstaller/libblockdev;branch=master \ -" +inherit autotools gobject-introspection +SRC_URI = "git://github.com/storaged-project/libblockdev;branch=2.x-branch" +SRCREV = "f5a4ba8bb298f8cbc435707d0b19b4b2ff836a8e" S = "${WORKDIR}/git" -FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}" +FILES_${PN} += "${libdir}/python2.7/dist-packages ${libdir}/python3.*/site-packages" -PACKAGECONFIG ??= "python3 lvm dm kmod parted fs escrow btrfs crypto mdraid kbd mpath" +PACKAGECONFIG ??= "python3 lvm dm kmod parted fs escrow btrfs crypto mdraid kbd mpath nvdimm" PACKAGECONFIG[python3] = "--with-python3, --without-python3,,python3" -PACKAGECONFIG[python2] = "--with-python2, --without-python2,,python2" +PACKAGECONFIG[python2] = "--with-python2, --without-python2,,python" PACKAGECONFIG[lvm] = "--with-lvm, --without-lvm, multipath-tools, lvm2" PACKAGECONFIG[lvm-dbus] = "--with-lvm_dbus, --without-lvm_dbus, multipath-tools, lvm2" PACKAGECONFIG[dm] = "--with-dm, --without-dm, multipath-tools, lvm2" @@ -30,7 +27,7 @@ PACKAGECONFIG[kmod] = "--with-kbd, --without-kbd, kmod" PACKAGECONFIG[parted] = "--with-part, --without-part, parted" PACKAGECONFIG[fs] = "--with-fs, --without-fs, util-linux" PACKAGECONFIG[doc] = "--with-gtk-doc, --without-gtk-doc, gtk-doc-native" -PACKAGECONFIG[nvdimm] = "--with-nvdimm, --without-nvdimm" +PACKAGECONFIG[nvdimm] = "--with-nvdimm, --without-nvdimm, ndctl util-linux" PACKAGECONFIG[vdo] = "--with-vdo, --without-vdo" PACKAGECONFIG[escrow] = "--with-escrow, --without-escrow, nss volume-key" PACKAGECONFIG[btrfs] = "--with-btrfs,--without-btrfs,libbytesize btrfs-tools" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libcec/files/0001-Explicitly-use-python3-in-pyCecClient.patch b/external/meta-openembedded/meta-oe/recipes-extended/libcec/files/0001-Explicitly-use-python3-in-pyCecClient.patch deleted file mode 100644 index ec1f5d0d..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/libcec/files/0001-Explicitly-use-python3-in-pyCecClient.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 16e8c072709572ccefa6c7f835136db01f031323 Mon Sep 17 00:00:00 2001 -From: Pascal Bach <pascal.bach@siemens.com> -Date: Fri, 28 Sep 2018 16:56:14 +0200 -Subject: [PATCH] Explicitly use python3 in pyCecClient - -Upstream-Status: Submitted [https://github.com/Pulse-Eight/libcec/pull/433] - ---- - src/pyCecClient/pyCecClient.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/pyCecClient/pyCecClient.py b/src/pyCecClient/pyCecClient.py -index 6d47857..d0504ac 100755 ---- a/src/pyCecClient/pyCecClient.py -+++ b/src/pyCecClient/pyCecClient.py -@@ -1,4 +1,4 @@ --#! /usr/bin/python -+#! /usr/bin/python3 - ## demo of the python-libcec API - - # This file is part of the libCEC(R) library. --- -2.11.0 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libcec/libcec/0001-CheckPlatformSupport.cmake-Do-not-hardcode-lib-path.patch b/external/meta-openembedded/meta-oe/recipes-extended/libcec/libcec/0001-CheckPlatformSupport.cmake-Do-not-hardcode-lib-path.patch new file mode 100644 index 00000000..3ecbfce2 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/libcec/libcec/0001-CheckPlatformSupport.cmake-Do-not-hardcode-lib-path.patch @@ -0,0 +1,42 @@ +From 95d4df3b713925e2c4894a2e4d50b06df861d9ef Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 18 Dec 2019 23:37:40 -0800 +Subject: [PATCH] CheckPlatformSupport.cmake: Do not hardcode lib path + +Using CMAKE_INSTALL_LIBDIR ensures that we can build for multilib env + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/libcec/cmake/CheckPlatformSupport.cmake | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/libcec/cmake/CheckPlatformSupport.cmake b/src/libcec/cmake/CheckPlatformSupport.cmake +index 2d7102f..55e78f8 100644 +--- a/src/libcec/cmake/CheckPlatformSupport.cmake ++++ b/src/libcec/cmake/CheckPlatformSupport.cmake +@@ -224,16 +224,16 @@ else() + + if (${PYTHON_MAJOR_VERSION} EQUAL 2) + install(TARGETS ${SWIG_MODULE_cec_REAL_NAME} +- DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/${PYTHON_LIB_INSTALL_PATH}/cec) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/${PYTHON_LIB_INSTALL_PATH}/cec) + install(FILES ${CMAKE_BINARY_DIR}/src/libcec/cec.py +- DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}) ++ DESTINATION l${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}) + install(FILES ${CMAKE_SOURCE_DIR}/src/libcec/cmake/__init__.py +- DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/cec) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/cec) + else() + install(TARGETS ${SWIG_MODULE_cec_REAL_NAME} +- DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/${PYTHON_LIB_INSTALL_PATH}) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/${PYTHON_LIB_INSTALL_PATH}) + install(FILES ${CMAKE_BINARY_DIR}/src/libcec/cec.py +- DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}) + endif() + endif() + endif() +-- +2.24.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libcec/libcec/0001-Enhance-reproducibility.patch b/external/meta-openembedded/meta-oe/recipes-extended/libcec/libcec/0001-Enhance-reproducibility.patch new file mode 100644 index 00000000..f08887b8 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/libcec/libcec/0001-Enhance-reproducibility.patch @@ -0,0 +1,33 @@ +From 240727d3142700af779ca6f5c4677419787bca28 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 28 Apr 2020 16:15:20 -0700 +Subject: [PATCH] Enhance reproducibility + +SetBuildInfo.cmake groks information from build system and emits that +into sourcecode ( header file ) which is then compiled into binary, this +string is build system dependent, therefore can cause reproducibility +issues, here we set static string for LIB_INFO + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/libcec/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libcec/CMakeLists.txt b/src/libcec/CMakeLists.txt +index 19a070b..4b3c827 100644 +--- a/src/libcec/CMakeLists.txt ++++ b/src/libcec/CMakeLists.txt +@@ -133,7 +133,7 @@ set(CEC_HEADERS devices/CECRecordingDevice.h + source_group("Header Files" FILES ${CEC_HEADERS}) + + # platform and device specific +-include(cmake/SetBuildInfo.cmake) ++set(LIB_INFO "compiled on ${CMAKE_SYSTEM} ... ") + include(cmake/CheckPlatformSupport.cmake) + + ## create project groups +-- +2.26.2 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libcec/libcec_git.bb b/external/meta-openembedded/meta-oe/recipes-extended/libcec/libcec_git.bb index 4ad49971..39ceb489 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/libcec/libcec_git.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/libcec/libcec_git.bb @@ -2,18 +2,20 @@ SUMMARY = "USB CEC Adaptor communication Library" HOMEPAGE = "http://libcec.pulse-eight.com/" LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=e61fd86f9c947b430126181da2c6c715" +LIC_FILES_CHKSUM = "file://COPYING;md5=b3a719e97f49e4841e90573f9b1a98ac" DEPENDS = "p8platform udev ncurses swig-native python3" DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libx11 libxrandr', '', d)}" DEPENDS_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' userland', d)}" -PV = "4.0.2+gitr${SRCPV}" +PV = "5.0.0" -SRCREV = "0a97062dd4b196ceeb003ec41841c7a7edc36dd1" -SRC_URI = "git://github.com/Pulse-Eight/libcec.git \ - file://0001-Explicitly-use-python3-in-pyCecClient.patch" +SRCREV = "43bc27fe7be491149e6f57d14110e02abdac2f24" +SRC_URI = "git://github.com/Pulse-Eight/libcec.git;branch=release \ + file://0001-CheckPlatformSupport.cmake-Do-not-hardcode-lib-path.patch \ + file://0001-Enhance-reproducibility.patch \ + " S = "${WORKDIR}/git" @@ -22,7 +24,7 @@ inherit cmake pkgconfig # Put client tools into a separate package PACKAGE_BEFORE_PN += "${PN}-tools" FILES_${PN}-tools = "${bindir}" -RDEPENDS_${PN}-tools = "python3-${BPN}" +RDEPENDS_${PN}-tools = "python3-${BPN} python3-core" # Create the wrapper for python3 PACKAGES += "python3-${BPN}" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libdivecomputer/files/fix-ar.patch b/external/meta-openembedded/meta-oe/recipes-extended/libdivecomputer/files/fix-ar.patch deleted file mode 100644 index f65d26aa..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/libdivecomputer/files/fix-ar.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- - configure.ac | 1 + - 1 file changed, 1 insertion(+) - -Index: git/configure.ac -=================================================================== ---- git.orig/configure.ac -+++ git/configure.ac -@@ -56,6 +56,7 @@ AM_CONDITIONAL([ENABLE_EXAMPLES], [test - # Checks for programs. - AC_PROG_CC - AC_PROG_CC_C99 -+AM_PROG_AR - - # Enable automake silent build rules. - m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libdivecomputer/libdivecomputer_git.bb b/external/meta-openembedded/meta-oe/recipes-extended/libdivecomputer/libdivecomputer_git.bb index 6c4f4a07..b7c1958e 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/libdivecomputer/libdivecomputer_git.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/libdivecomputer/libdivecomputer_git.bb @@ -8,11 +8,10 @@ DEPENDS = "libusb1" inherit autotools pkgconfig -PV = "0.4.2+gitr${SRCPV}" +PV = "0.6.0" -SRCREV = "5f765f91430f16932d96b3777404420aa2dd4c7c" -SRC_URI = "git://git.libdivecomputer.org/libdivecomputer.git \ - file://fix-ar.patch \ +SRCREV = "1195abc2f4acc7b10175d570ec73549d0938c83e" +SRC_URI = "git://github.com/libdivecomputer/libdivecomputer.git;protocol=https \ " S = "${WORKDIR}/git" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libgxim/libgxim_0.5.0.bb b/external/meta-openembedded/meta-oe/recipes-extended/libgxim/libgxim_0.5.0.bb index 7e4c330a..8a2886b8 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/libgxim/libgxim_0.5.0.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/libgxim/libgxim_0.5.0.bb @@ -26,6 +26,6 @@ file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1" EXTRA_OECONF = " --disable-static --disable-rebuilds --enable-compile-warnings=minimum" DEPENDS += "gtk+ glib-2.0 glib-2.0-native ruby-native intltool-native gnome-common-native" -inherit distro_features_check autotools pkgconfig gettext +inherit features_check autotools pkgconfig gettext REQUIRED_DISTRO_FEATURES = "x11" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libidn/libidn/0001-idn-format-security-warnings.patch b/external/meta-openembedded/meta-oe/recipes-extended/libidn/libidn/0001-idn-format-security-warnings.patch new file mode 100644 index 00000000..5adc7d9f --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/libidn/libidn/0001-idn-format-security-warnings.patch @@ -0,0 +1,181 @@ +From 82f98dcbc429bbe89a9837c533cbcbc02e77c790 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com> +Date: Tue, 28 Jun 2016 12:43:31 +0100 +Subject: [PATCH] idn: fix printf() format security warnings +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +| ../../libidn-1.32/src/idn.c: In function 'main': +| ../../libidn-1.32/src/idn.c:172:7: error: format not a string literal and no format arguments [-Werror=format-security] +| error (0, 0, _("only one of -s, -e, -d, -a, -u or -n can be specified")); +| ^~~~~ +| ../../libidn-1.32/src/idn.c:187:5: error: format not a string literal and no format arguments [-Werror=format-security] +| fprintf (stderr, _("Type each input string on a line by itself, " +| ^~~~~~~ +| ../../libidn-1.32/src/idn.c:202:4: error: format not a string literal and no format arguments [-Werror=format-security] +| error (EXIT_FAILURE, errno, _("input error")); +| ^~~~~ +| ../../libidn-1.32/src/idn.c:220:8: error: format not a string literal and no format arguments [-Werror=format-security] +| _("could not convert from UTF-8 to UCS-4")); +| ^ +| ../../libidn-1.32/src/idn.c:245:8: error: format not a string literal and no format arguments [-Werror=format-security] +| _("could not convert from UTF-8 to UCS-4")); +| ^ +| ../../libidn-1.32/src/idn.c:281:6: error: format not a string literal and no format arguments [-Werror=format-security] +| _("could not convert from UTF-8 to UCS-4")); +| ^ +| ../../libidn-1.32/src/idn.c:340:6: error: format not a string literal and no format arguments [-Werror=format-security] +| _("could not convert from UCS-4 to UTF-8")); +| ^ +| ../../libidn-1.32/src/idn.c:364:6: error: format not a string literal and no format arguments [-Werror=format-security] +| _("could not convert from UCS-4 to UTF-8")); +| ^ +| ../../libidn-1.32/src/idn.c:442:8: error: format not a string literal and no format arguments [-Werror=format-security] +| _("could not convert from UCS-4 to UTF-8")); +| ^ +| ../../libidn-1.32/src/idn.c:498:6: error: format not a string literal and no format arguments [-Werror=format-security] +| _("could not convert from UTF-8 to UCS-4")); +| ^ +| ../../libidn-1.32/src/idn.c:527:5: error: format not a string literal and no format arguments [-Werror=format-security] +| _("could not convert from UTF-8 to UCS-4")); +| ^ +| ../../libidn-1.32/src/idn.c:540:6: error: format not a string literal and no format arguments [-Werror=format-security] +| error (EXIT_FAILURE, 0, _("could not do NFKC normalization")); +| ^~~~~ +| ../../libidn-1.32/src/idn.c:551:5: error: format not a string literal and no format arguments [-Werror=format-security] +| _("could not convert from UTF-8 to UCS-4")); +| ^ + +Signed-off-by: André Draszik <adraszik@tycoint.com> +--- +Upstream-Status: Pending + + src/idn.c | 27 ++++++++++++++------------- + 1 file changed, 14 insertions(+), 13 deletions(-) + +diff --git a/src/idn.c b/src/idn.c +index be1c7d1..68e4291 100644 +--- a/src/idn.c ++++ b/src/idn.c +@@ -170,7 +170,7 @@ main (int argc, char *argv[]) + (args_info.idna_to_unicode_given ? 1 : 0) + + (args_info.nfkc_given ? 1 : 0) != 1) + { +- error (0, 0, _("only one of -s, -e, -d, -a, -u or -n can be specified")); ++ error (0, 0, "%s", _("only one of -s, -e, -d, -a, -u or -n can be specified")); + usage (EXIT_FAILURE); + } + +@@ -185,7 +185,7 @@ main (int argc, char *argv[]) + if (!args_info.quiet_given + && args_info.inputs_num == 0 + && isatty (fileno (stdin))) +- fprintf (stderr, _("Type each input string on a line by itself, " ++ fprintf (stderr, "%s", _("Type each input string on a line by itself, " + "terminated by a newline character.\n")); + + do +@@ -197,7 +197,7 @@ main (int argc, char *argv[]) + if (feof (stdin)) + break; + +- error (EXIT_FAILURE, errno, _("input error")); ++ error (EXIT_FAILURE, errno, "%s", _("input error")); + } + + if (strlen (line) > 0) +@@ -215,7 +215,7 @@ main (int argc, char *argv[]) + if (!q) + { + free (p); +- error (EXIT_FAILURE, 0, ++ error (EXIT_FAILURE, 0, "%s", + _("could not convert from UTF-8 to UCS-4")); + } + +@@ -240,7 +240,7 @@ main (int argc, char *argv[]) + if (!q) + { + free (r); +- error (EXIT_FAILURE, 0, ++ error (EXIT_FAILURE, 0, "%s", + _("could not convert from UTF-8 to UCS-4")); + } + +@@ -277,7 +277,7 @@ main (int argc, char *argv[]) + q = stringprep_utf8_to_ucs4 (p, -1, &len); + free (p); + if (!q) +- error (EXIT_FAILURE, 0, ++ error (EXIT_FAILURE, 0, "%s", + _("could not convert from UTF-8 to UCS-4")); + + if (args_info.debug_given) +@@ -336,7 +336,7 @@ main (int argc, char *argv[]) + r = stringprep_ucs4_to_utf8 (q, -1, NULL, NULL); + free (q); + if (!r) +- error (EXIT_FAILURE, 0, ++ error (EXIT_FAILURE, 0, "%s", + _("could not convert from UCS-4 to UTF-8")); + + p = stringprep_utf8_to_locale (r); +@@ -360,7 +360,7 @@ main (int argc, char *argv[]) + q = stringprep_utf8_to_ucs4 (p, -1, NULL); + free (p); + if (!q) +- error (EXIT_FAILURE, 0, ++ error (EXIT_FAILURE, 0, "%s", + _("could not convert from UCS-4 to UTF-8")); + + if (args_info.debug_given) +@@ -438,7 +438,7 @@ main (int argc, char *argv[]) + if (!q) + { + free (p); +- error (EXIT_FAILURE, 0, ++ error (EXIT_FAILURE, 0, "%s", + _("could not convert from UCS-4 to UTF-8")); + } + +@@ -494,7 +494,7 @@ main (int argc, char *argv[]) + r = stringprep_ucs4_to_utf8 (q, -1, NULL, NULL); + free (q); + if (!r) +- error (EXIT_FAILURE, 0, ++ error (EXIT_FAILURE, 0, "%s", + _("could not convert from UTF-8 to UCS-4")); + + p = stringprep_utf8_to_locale (r); +@@ -523,7 +523,7 @@ main (int argc, char *argv[]) + if (!q) + { + free (p); +- error (EXIT_FAILURE, 0, ++ error (EXIT_FAILURE, 0, "%s", + _("could not convert from UTF-8 to UCS-4")); + } + +@@ -537,7 +537,8 @@ main (int argc, char *argv[]) + r = stringprep_utf8_nfkc_normalize (p, -1); + free (p); + if (!r) +- error (EXIT_FAILURE, 0, _("could not do NFKC normalization")); ++ error (EXIT_FAILURE, 0, "%s", ++ _("could not do NFKC normalization")); + + if (args_info.debug_given) + { +@@ -547,7 +548,7 @@ main (int argc, char *argv[]) + if (!q) + { + free (r); +- error (EXIT_FAILURE, 0, ++ error (EXIT_FAILURE, 0, "%s", + _("could not convert from UTF-8 to UCS-4")); + } + +-- +2.8.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch b/external/meta-openembedded/meta-oe/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch new file mode 100644 index 00000000..0863530f --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch @@ -0,0 +1,23 @@ +Upstream-Status: Inappropriate [disable feature] + +Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> +diff -Nurdd libidn-1.26/doc/Makefile.am libidn-1.26/doc/Makefile.am +--- libidn-1.26/doc/Makefile.am 2012-09-18 11:25:45.000000000 +0300 ++++ libidn-1.26/doc/Makefile.am 2013-02-08 07:41:24.591431462 +0200 +@@ -49,15 +49,9 @@ + + # Man pages. + +-dist_man_MANS = idn.1 $(gdoc_MANS) ++dist_man_MANS = $(gdoc_MANS) + MAINTAINERCLEANFILES = $(dist_man_MANS) + +-idn.1: $(top_srcdir)/src/idn.c $(top_srcdir)/src/idn.ggo \ +- $(top_srcdir)/configure.ac +- $(HELP2MAN) \ +- --name="Internationalized Domain Names command line tool" \ +- --output=$@ $(top_builddir)/src/idn$(EXEEXT) +- + # GDOC + + GDOC_BIN = $(srcdir)/gdoc diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libidn/libidn_1.35.bb b/external/meta-openembedded/meta-oe/recipes-extended/libidn/libidn_1.35.bb new file mode 100644 index 00000000..10574035 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/libidn/libidn_1.35.bb @@ -0,0 +1,40 @@ +SUMMARY = "Internationalized Domain Name support library" +DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group." +HOMEPAGE = "http://www.gnu.org/software/libidn/" +SECTION = "libs" +LICENSE = "(LGPLv2.1+ | LGPLv3) & GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=df4be47940a91ee69556f5f71eed4aec \ + file://COPYING.LESSERv2;md5=4fbd65380cdd255951079008b364516c \ + file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ + file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \ + file://lib/idna.h;endline=21;md5=37cffad24807f446a24de3e7371f20b9 \ + file://src/idn.c;endline=20;md5=09e97034a8877b3451cb65065fc2c06e" +DEPENDS = "virtual/libiconv autoconf-archive" + +inherit pkgconfig autotools gettext texinfo gtk-doc + +SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \ + file://dont-depend-on-help2man.patch \ + file://0001-idn-format-security-warnings.patch \ + " + +SRC_URI[md5sum] = "bef634141fe39326cb354b75e891fead" +SRC_URI[sha256sum] = "f11af1005b46b7b15d057d7f107315a1ad46935c7fcdf243c16e46ec14f0fe1e" + +# command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3 +# so package command into a separate package +PACKAGES =+ "idn" +FILES_idn = "${bindir}/*" + +LICENSE_${PN} = "LGPLv2.1+ | LGPLv3" +LICENSE_idn = "GPLv3+" + +EXTRA_OECONF = "--disable-csharp" + +do_install_append() { + rm -rf ${D}${datadir}/emacs +} + +BBCLASSEXTEND = "native nativesdk" + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libimobiledevice/libplist_2.0.0.bb b/external/meta-openembedded/meta-oe/recipes-extended/libimobiledevice/libplist_2.1.0.bb index 43c1fd5c..36659e75 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/libimobiledevice/libplist_2.0.0.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/libimobiledevice/libplist_2.1.0.bb @@ -4,11 +4,11 @@ LICENSE = "GPLv2 & LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=ebb5c50ab7cab4baeffba14977030c07 \ file://COPYING.LESSER;md5=6ab17b41640564434dda85c06b7124f7" -DEPENDS = "libxml2 glib-2.0 swig python" +DEPENDS = "libxml2 glib-2.0 swig python3" -inherit autotools pkgconfig pythonnative +inherit autotools pkgconfig python3native -SRCREV = "62ec804736435fa34e37e66e228e17e2aacee1d7" +SRCREV = "3df02d4d0e9008771e8622fdc10de8333b3f0d85" SRC_URI = "git://github.com/libimobiledevice/libplist;protocol=https \ " diff --git a/external/meta-openembedded/meta-oe/recipes-extended/liblightmodbus/liblightmodbus/0001-cmake-Use-GNUInstallDirs-instead-of-hardcoding-lib-p.patch b/external/meta-openembedded/meta-oe/recipes-extended/liblightmodbus/liblightmodbus/0001-cmake-Use-GNUInstallDirs-instead-of-hardcoding-lib-p.patch new file mode 100644 index 00000000..321b4128 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/liblightmodbus/liblightmodbus/0001-cmake-Use-GNUInstallDirs-instead-of-hardcoding-lib-p.patch @@ -0,0 +1,37 @@ +From 066c49158a71ea77598c9e1ae16bba63d6ac6bb5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 19 Dec 2019 23:41:35 -0800 +Subject: [PATCH] cmake: Use GNUInstallDirs instead of hardcoding lib path + +Upstream-Status: Submitted [https://github.com/Jacajack/liblightmodbus/pull/12] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ce6cc88..bee83aa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -242,14 +242,14 @@ if ( DEFINED AVR ) + ) + endif( ) + +- ++include(GNUInstallDirs) + #Installation + install( + TARGETS lightmodbus +- ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/" ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/" + ) + + #Install headers + install( + DIRECTORY "${CMAKE_SOURCE_DIR}/include/" DESTINATION "${CMAKE_INSTALL_PREFIX}/include/" FILES_MATCHING PATTERN "*.h" +-) +\ No newline at end of file ++) +-- +2.24.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/liblightmodbus/liblightmodbus_2.0.2.bb b/external/meta-openembedded/meta-oe/recipes-extended/liblightmodbus/liblightmodbus_2.0.2.bb new file mode 100644 index 00000000..7fc59979 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/liblightmodbus/liblightmodbus_2.0.2.bb @@ -0,0 +1,15 @@ +SUMMARY = "A cross-platform, lightweight Modbus RTU library" +DESCRIPTION = "liblightmodbus is a very lightweight, highly configurable, \ + platform-independent Modbus RTU library." + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://LICENSE;md5=84dcc94da3adb52b53ae4fa38fe49e5d" + +inherit cmake pkgconfig + +SRC_URI = "git://github.com/Jacajack/liblightmodbus.git;protocol=https \ + file://0001-cmake-Use-GNUInstallDirs-instead-of-hardcoding-lib-p.patch \ + " +SRCREV = "59d2b405f95701e5b04326589786dbb43ce49e81" + +S = "${WORKDIR}/git" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/liblockfile/liblockfile/0001-Makefile.in-install-nfslock.so-and-nfslock.so.0.patch b/external/meta-openembedded/meta-oe/recipes-extended/liblockfile/liblockfile/0001-Makefile.in-install-nfslock-libs.patch index a6b297b5..a6b297b5 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/liblockfile/liblockfile/0001-Makefile.in-install-nfslock.so-and-nfslock.so.0.patch +++ b/external/meta-openembedded/meta-oe/recipes-extended/liblockfile/liblockfile/0001-Makefile.in-install-nfslock-libs.patch diff --git a/external/meta-openembedded/meta-oe/recipes-extended/liblockfile/liblockfile_1.14.bb b/external/meta-openembedded/meta-oe/recipes-extended/liblockfile/liblockfile_1.14.bb index de2c1e36..10d88a3b 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/liblockfile/liblockfile_1.14.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/liblockfile/liblockfile_1.14.bb @@ -8,7 +8,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/libl/liblockfile/liblockfile_1.14.orig.tar.gz \ ${DEBIAN_MIRROR}/main/libl/liblockfile/liblockfile_1.14-1.debian.tar.bz2;name=1.14-1 \ file://configure.patch \ file://0001-Makefile.in-add-DESTDIR.patch \ - file://0001-Makefile.in-install-nfslock.so-and-nfslock.so.0.patch \ + file://0001-Makefile.in-install-nfslock-libs.patch \ file://liblockfile-fix-install-so-to-man-dir.patch \ " diff --git a/external/meta-openembedded/meta-oe/recipes-extended/liblogging/liblogging_1.0.6.bb b/external/meta-openembedded/meta-oe/recipes-extended/liblogging/liblogging_1.0.6.bb index bb598451..5c1c1515 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/liblogging/liblogging_1.0.6.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/liblogging/liblogging_1.0.6.bb @@ -8,7 +8,7 @@ sophisticated "behind the scenes" with better support for multiple threads \ and flexibility for different log destinations (e.g. syslog and systemd \ journal)." SECTION = "libs" -LICENSE = "BSD" +LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=63fe03535d83726f5655072502bef1bc" SRC_URI = "http://download.rsyslog.com/${BPN}/${BPN}-${PV}.tar.gz" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus.inc b/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus.inc index a01659a7..b502177a 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus.inc +++ b/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus.inc @@ -10,4 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=4fbd65380cdd255951079008b364516c" SRC_URI = "http://libmodbus.org/releases/${BP}.tar.gz" +PACKAGECONFIG ??= "" +PACKAGECONFIG[documentation] = "--with-documentation,--without-documentation,asciidoc-native xmlto-native" + inherit autotools pkgconfig diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/Fix-float-endianness-issue-on-big-endian-arch.patch b/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/Fix-float-endianness-issue-on-big-endian-arch.patch new file mode 100644 index 00000000..5372a23b --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/Fix-float-endianness-issue-on-big-endian-arch.patch @@ -0,0 +1,314 @@ +From: =?utf-8?b?IlNaIExpbiAo5p6X5LiK5pm6KSI=?= <szlin@debian.org> +Date: Wed, 19 Dec 2018 10:24:47 +0800 +Subject: Fix float endianness issue on big endian arch + +It converts float values depending on what order they come in. + +This patch was modified from rm5248 [1] + +[1] https://github.com/synexxus/libmodbus/commit/a511768e7fe7ec52d7bae1d9ae04e33f87a59627 + +--- + src/modbus-data.c | 110 ++++++++++++++++++++++++++++++++++++++--------- + tests/unit-test-client.c | 22 ++++++---- + tests/unit-test.h.in | 41 ++++++++++++++++-- + 3 files changed, 141 insertions(+), 32 deletions(-) + +diff --git a/src/modbus-data.c b/src/modbus-data.c +index 902b8c6..7a744fa 100644 +--- a/src/modbus-data.c ++++ b/src/modbus-data.c +@@ -119,9 +119,18 @@ float modbus_get_float_abcd(const uint16_t *src) + { + float f; + uint32_t i; ++ uint8_t a, b, c, d; + +- i = ntohl(((uint32_t)src[0] << 16) + src[1]); +- memcpy(&f, &i, sizeof(float)); ++ a = (src[0] >> 8) & 0xFF; ++ b = (src[0] >> 0) & 0xFF; ++ c = (src[1] >> 8) & 0xFF; ++ d = (src[1] >> 0) & 0xFF; ++ ++ i = (a << 24) | ++ (b << 16) | ++ (c << 8) | ++ (d << 0); ++ memcpy(&f, &i, 4); + + return f; + } +@@ -131,9 +140,18 @@ float modbus_get_float_dcba(const uint16_t *src) + { + float f; + uint32_t i; ++ uint8_t a, b, c, d; + +- i = ntohl(bswap_32((((uint32_t)src[0]) << 16) + src[1])); +- memcpy(&f, &i, sizeof(float)); ++ a = (src[0] >> 8) & 0xFF; ++ b = (src[0] >> 0) & 0xFF; ++ c = (src[1] >> 8) & 0xFF; ++ d = (src[1] >> 0) & 0xFF; ++ ++ i = (d << 24) | ++ (c << 16) | ++ (b << 8) | ++ (a << 0); ++ memcpy(&f, &i, 4); + + return f; + } +@@ -143,9 +161,18 @@ float modbus_get_float_badc(const uint16_t *src) + { + float f; + uint32_t i; ++ uint8_t a, b, c, d; + +- i = ntohl((uint32_t)(bswap_16(src[0]) << 16) + bswap_16(src[1])); +- memcpy(&f, &i, sizeof(float)); ++ a = (src[0] >> 8) & 0xFF; ++ b = (src[0] >> 0) & 0xFF; ++ c = (src[1] >> 8) & 0xFF; ++ d = (src[1] >> 0) & 0xFF; ++ ++ i = (b << 24) | ++ (a << 16) | ++ (d << 8) | ++ (c << 0); ++ memcpy(&f, &i, 4); + + return f; + } +@@ -155,9 +182,18 @@ float modbus_get_float_cdab(const uint16_t *src) + { + float f; + uint32_t i; ++ uint8_t a, b, c, d; + +- i = ntohl((((uint32_t)src[1]) << 16) + src[0]); +- memcpy(&f, &i, sizeof(float)); ++ a = (src[0] >> 8) & 0xFF; ++ b = (src[0] >> 0) & 0xFF; ++ c = (src[1] >> 8) & 0xFF; ++ d = (src[1] >> 0) & 0xFF; ++ ++ i = (c << 24) | ++ (d << 16) | ++ (a << 8) | ++ (b << 0); ++ memcpy(&f, &i, 4); + + return f; + } +@@ -172,50 +208,84 @@ float modbus_get_float(const uint16_t *src) + memcpy(&f, &i, sizeof(float)); + + return f; ++ + } + + /* Set a float to 4 bytes for Modbus w/o any conversion (ABCD) */ + void modbus_set_float_abcd(float f, uint16_t *dest) + { + uint32_t i; ++ uint8_t *out = (uint8_t*) dest; ++ uint8_t a, b, c, d; + + memcpy(&i, &f, sizeof(uint32_t)); +- i = htonl(i); +- dest[0] = (uint16_t)(i >> 16); +- dest[1] = (uint16_t)i; ++ a = (i >> 24) & 0xFF; ++ b = (i >> 16) & 0xFF; ++ c = (i >> 8) & 0xFF; ++ d = (i >> 0) & 0xFF; ++ ++ out[0] = a; ++ out[1] = b; ++ out[2] = c; ++ out[3] = d; + } + + /* Set a float to 4 bytes for Modbus with byte and word swap conversion (DCBA) */ + void modbus_set_float_dcba(float f, uint16_t *dest) + { + uint32_t i; ++ uint8_t *out = (uint8_t*) dest; ++ uint8_t a, b, c, d; + + memcpy(&i, &f, sizeof(uint32_t)); +- i = bswap_32(htonl(i)); +- dest[0] = (uint16_t)(i >> 16); +- dest[1] = (uint16_t)i; ++ a = (i >> 24) & 0xFF; ++ b = (i >> 16) & 0xFF; ++ c = (i >> 8) & 0xFF; ++ d = (i >> 0) & 0xFF; ++ ++ out[0] = d; ++ out[1] = c; ++ out[2] = b; ++ out[3] = a; ++ + } + + /* Set a float to 4 bytes for Modbus with byte swap conversion (BADC) */ + void modbus_set_float_badc(float f, uint16_t *dest) + { + uint32_t i; ++ uint8_t *out = (uint8_t*) dest; ++ uint8_t a, b, c, d; + + memcpy(&i, &f, sizeof(uint32_t)); +- i = htonl(i); +- dest[0] = (uint16_t)bswap_16(i >> 16); +- dest[1] = (uint16_t)bswap_16(i & 0xFFFF); ++ a = (i >> 24) & 0xFF; ++ b = (i >> 16) & 0xFF; ++ c = (i >> 8) & 0xFF; ++ d = (i >> 0) & 0xFF; ++ ++ out[0] = b; ++ out[1] = a; ++ out[2] = d; ++ out[3] = c; + } + + /* Set a float to 4 bytes for Modbus with word swap conversion (CDAB) */ + void modbus_set_float_cdab(float f, uint16_t *dest) + { + uint32_t i; ++ uint8_t *out = (uint8_t*) dest; ++ uint8_t a, b, c, d; + + memcpy(&i, &f, sizeof(uint32_t)); +- i = htonl(i); +- dest[0] = (uint16_t)i; +- dest[1] = (uint16_t)(i >> 16); ++ a = (i >> 24) & 0xFF; ++ b = (i >> 16) & 0xFF; ++ c = (i >> 8) & 0xFF; ++ d = (i >> 0) & 0xFF; ++ ++ out[0] = c; ++ out[1] = d; ++ out[2] = a; ++ out[3] = b; + } + + /* DEPRECATED - Set a float to 4 bytes in a sort of Modbus format! */ +diff --git a/tests/unit-test-client.c b/tests/unit-test-client.c +index 3e315f4..3fccf3e 100644 +--- a/tests/unit-test-client.c ++++ b/tests/unit-test-client.c +@@ -27,6 +27,7 @@ int send_crafted_request(modbus_t *ctx, int function, + uint16_t max_value, uint16_t bytes, + int backend_length, int backend_offset); + int equal_dword(uint16_t *tab_reg, const uint32_t value); ++int is_memory_equal(const void *s1, const void *s2, size_t size); + + #define BUG_REPORT(_cond, _format, _args ...) \ + printf("\nLine %d: assertion error for '%s': " _format "\n", __LINE__, # _cond, ## _args) +@@ -40,6 +41,11 @@ int equal_dword(uint16_t *tab_reg, const uint32_t value); + } \ + }; + ++int is_memory_equal(const void *s1, const void *s2, size_t size) ++{ ++ return (memcmp(s1, s2, size) == 0); ++} ++ + int equal_dword(uint16_t *tab_reg, const uint32_t value) { + return ((tab_reg[0] == (value >> 16)) && (tab_reg[1] == (value & 0xFFFF))); + } +@@ -286,26 +292,26 @@ int main(int argc, char *argv[]) + /** FLOAT **/ + printf("1/4 Set/get float ABCD: "); + modbus_set_float_abcd(UT_REAL, tab_rp_registers); +- ASSERT_TRUE(equal_dword(tab_rp_registers, UT_IREAL_ABCD), "FAILED Set float ABCD"); +- real = modbus_get_float_abcd(tab_rp_registers); ++ ASSERT_TRUE(is_memory_equal(tab_rp_registers, UT_IREAL_ABCD_SET, 4), "FAILED Set float ABCD"); ++ real = modbus_get_float_abcd(UT_IREAL_ABCD_GET); + ASSERT_TRUE(real == UT_REAL, "FAILED (%f != %f)\n", real, UT_REAL); + + printf("2/4 Set/get float DCBA: "); + modbus_set_float_dcba(UT_REAL, tab_rp_registers); +- ASSERT_TRUE(equal_dword(tab_rp_registers, UT_IREAL_DCBA), "FAILED Set float DCBA"); +- real = modbus_get_float_dcba(tab_rp_registers); ++ ASSERT_TRUE(is_memory_equal(tab_rp_registers, UT_IREAL_DCBA_SET, 4), "FAILED Set float DCBA"); ++ real = modbus_get_float_dcba(UT_IREAL_DCBA_GET); + ASSERT_TRUE(real == UT_REAL, "FAILED (%f != %f)\n", real, UT_REAL); + + printf("3/4 Set/get float BADC: "); + modbus_set_float_badc(UT_REAL, tab_rp_registers); +- ASSERT_TRUE(equal_dword(tab_rp_registers, UT_IREAL_BADC), "FAILED Set float BADC"); +- real = modbus_get_float_badc(tab_rp_registers); ++ ASSERT_TRUE(is_memory_equal(tab_rp_registers, UT_IREAL_BADC_SET, 4), "FAILED Set float BADC"); ++ real = modbus_get_float_badc(UT_IREAL_BADC_GET); + ASSERT_TRUE(real == UT_REAL, "FAILED (%f != %f)\n", real, UT_REAL); + + printf("4/4 Set/get float CDAB: "); + modbus_set_float_cdab(UT_REAL, tab_rp_registers); +- ASSERT_TRUE(equal_dword(tab_rp_registers, UT_IREAL_CDAB), "FAILED Set float CDAB"); +- real = modbus_get_float_cdab(tab_rp_registers); ++ ASSERT_TRUE(is_memory_equal(tab_rp_registers, UT_IREAL_CDAB_SET, 4), "FAILED Set float CDAB"); ++ real = modbus_get_float_cdab(UT_IREAL_CDAB_GET); + ASSERT_TRUE(real == UT_REAL, "FAILED (%f != %f)\n", real, UT_REAL); + + printf("\nAt this point, error messages doesn't mean the test has failed\n"); +diff --git a/tests/unit-test.h.in b/tests/unit-test.h.in +index dca826f..4ffa254 100644 +--- a/tests/unit-test.h.in ++++ b/tests/unit-test.h.in +@@ -56,12 +56,45 @@ const uint16_t UT_INPUT_REGISTERS_ADDRESS = 0x108; + const uint16_t UT_INPUT_REGISTERS_NB = 0x1; + const uint16_t UT_INPUT_REGISTERS_TAB[] = { 0x000A }; + ++/* ++ * This float value is 0x47F12000 (in big-endian format). ++ * In Little-endian(intel) format, it will be stored in memory as follows: ++ * 0x00 0x20 0xF1 0x47 ++ * ++ * You can check this with the following code: ++ ++ float fl = UT_REAL; ++ uint8_t *inmem = (uint8_t*)&fl; ++ int x; ++ for(x = 0; x < 4; x++){ ++ printf("0x%02X ", inmem[ x ]); ++ } ++ printf("\n"); ++ */ + const float UT_REAL = 123456.00; + +-const uint32_t UT_IREAL_ABCD = 0x0020F147; +-const uint32_t UT_IREAL_DCBA = 0x47F12000; +-const uint32_t UT_IREAL_BADC = 0x200047F1; +-const uint32_t UT_IREAL_CDAB = 0xF1470020; ++/* ++ * The following arrays assume that 'A' is the MSB, ++ * and 'D' is the LSB. ++ * Thus, the following is the case: ++ * A = 0x47 ++ * B = 0xF1 ++ * C = 0x20 ++ * D = 0x00 ++ * ++ * There are two sets of arrays: one to test that the setting is correct, ++ * the other to test that the getting is correct. ++ * Note that the 'get' values must be constants in processor-endianness, ++ * as libmodbus will convert all words to processor-endianness as they come in. ++ */ ++const uint8_t UT_IREAL_ABCD_SET[] = {0x47, 0xF1, 0x20, 0x00}; ++const uint16_t UT_IREAL_ABCD_GET[] = {0x47F1, 0x2000}; ++const uint8_t UT_IREAL_DCBA_SET[] = {0x00, 0x20, 0xF1, 0x47}; ++const uint16_t UT_IREAL_DCBA_GET[] = {0x0020, 0xF147}; ++const uint8_t UT_IREAL_BADC_SET[] = {0xF1, 0x47, 0x00, 0x20}; ++const uint16_t UT_IREAL_BADC_GET[] = {0xF147, 0x0020}; ++const uint8_t UT_IREAL_CDAB_SET[] = {0x20, 0x00, 0x47, 0xF1}; ++const uint16_t UT_IREAL_CDAB_GET[] = {0x2000, 0x47F1}; + + /* const uint32_t UT_IREAL_ABCD = 0x47F12000); + const uint32_t UT_IREAL_DCBA = 0x0020F147; diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/Fix-typo.patch b/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/Fix-typo.patch new file mode 100644 index 00000000..384a4a40 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/Fix-typo.patch @@ -0,0 +1,52 @@ +From: =?utf-8?b?IlNaIExpbiAo5p6X5LiK5pm6KSI=?= <szlin@debian.org> +Date: Thu, 27 Sep 2018 14:51:32 +0800 +Subject: Fix typo + +--- + doc/modbus_mapping_new_start_address.txt | 4 ++-- + doc/modbus_reply.txt | 2 +- + doc/modbus_reply_exception.txt | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/doc/modbus_mapping_new_start_address.txt b/doc/modbus_mapping_new_start_address.txt +index 4fa196a..94a81fb 100644 +--- a/doc/modbus_mapping_new_start_address.txt ++++ b/doc/modbus_mapping_new_start_address.txt +@@ -21,9 +21,9 @@ The _modbus_mapping_new_start_address()_ function shall allocate four arrays to + store bits, input bits, registers and inputs registers. The pointers are stored + in modbus_mapping_t structure. All values of the arrays are initialized to zero. + +-The different starting adresses make it possible to place the mapping at any ++The different starting addresses make it possible to place the mapping at any + address in each address space. This way, you can give access to values stored +-at high adresses without allocating memory from the address zero, for eg. to ++at high addresses without allocating memory from the address zero, for eg. to + make available registers from 10000 to 10009, you can use: + + [source,c] +diff --git a/doc/modbus_reply.txt b/doc/modbus_reply.txt +index 0b29d6f..6b71d11 100644 +--- a/doc/modbus_reply.txt ++++ b/doc/modbus_reply.txt +@@ -3,7 +3,7 @@ modbus_reply(3) + + NAME + ---- +-modbus_reply - send a reponse to the received request ++modbus_reply - send a response to the received request + + + SYNOPSIS +diff --git a/doc/modbus_reply_exception.txt b/doc/modbus_reply_exception.txt +index 7e6324f..b2170be 100644 +--- a/doc/modbus_reply_exception.txt ++++ b/doc/modbus_reply_exception.txt +@@ -3,7 +3,7 @@ modbus_reply_exception(3) + + NAME + ---- +-modbus_reply_exception - send an exception reponse ++modbus_reply_exception - send an exception response + + + SYNOPSIS diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/f1eb4bc7ccb09cd8d19ab641ee37637f8c34d16d.patch b/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/f1eb4bc7ccb09cd8d19ab641ee37637f8c34d16d.patch new file mode 100644 index 00000000..7fae34e7 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus/f1eb4bc7ccb09cd8d19ab641ee37637f8c34d16d.patch @@ -0,0 +1,32 @@ +From f1eb4bc7ccb09cd8d19ab641ee37637f8c34d16d Mon Sep 17 00:00:00 2001 +From: i-ky <gl.ivanovsky@gmail.com> +Date: Tue, 10 Jul 2018 15:58:45 +0300 +Subject: [PATCH] Fixed MODBUS_GET_* macros in case of negative values + +In case resulting value should be negative it is incorrect to use '+' operator to construct it from pieces, because highest bytes will result in negative number after bitwise shift while others will stay positive. Replacing addition with '|' should solve the issue. +--- + src/modbus.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/modbus.h b/src/modbus.h +index f6e9a5f5..c63f5ceb 100644 +--- a/src/modbus.h ++++ b/src/modbus.h +@@ -245,12 +245,12 @@ MODBUS_API int modbus_reply_exception(modbus_t *ctx, const uint8_t *req, + #define MODBUS_GET_HIGH_BYTE(data) (((data) >> 8) & 0xFF) + #define MODBUS_GET_LOW_BYTE(data) ((data) & 0xFF) + #define MODBUS_GET_INT64_FROM_INT16(tab_int16, index) \ +- (((int64_t)tab_int16[(index) ] << 48) + \ +- ((int64_t)tab_int16[(index) + 1] << 32) + \ +- ((int64_t)tab_int16[(index) + 2] << 16) + \ ++ (((int64_t)tab_int16[(index) ] << 48) | \ ++ ((int64_t)tab_int16[(index) + 1] << 32) | \ ++ ((int64_t)tab_int16[(index) + 2] << 16) | \ + (int64_t)tab_int16[(index) + 3]) +-#define MODBUS_GET_INT32_FROM_INT16(tab_int16, index) ((tab_int16[(index)] << 16) + tab_int16[(index) + 1]) +-#define MODBUS_GET_INT16_FROM_INT8(tab_int8, index) ((tab_int8[(index)] << 8) + tab_int8[(index) + 1]) ++#define MODBUS_GET_INT32_FROM_INT16(tab_int16, index) ((tab_int16[(index)] << 16) | tab_int16[(index) + 1]) ++#define MODBUS_GET_INT16_FROM_INT8(tab_int8, index) ((tab_int8[(index)] << 8) | tab_int8[(index) + 1]) + #define MODBUS_SET_INT16_TO_INT8(tab_int8, index, value) \ + do { \ + tab_int8[(index)] = (value) >> 8; \ diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.4.bb b/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.4.bb deleted file mode 100644 index d438a0ab..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.4.bb +++ /dev/null @@ -1,7 +0,0 @@ -require libmodbus.inc - -# Use the stable branch by default -DEFAULT_PREFERENCE = "-1" - -SRC_URI[md5sum] = "b1a8fd3a40d2db4de51fb0cbcb201806" -SRC_URI[sha256sum] = "c8c862b0e9a7ba699a49bc98f62bdffdfafd53a5716c0e162696b4bf108d3637" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.6.bb b/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.6.bb new file mode 100644 index 00000000..075487ae --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.6.bb @@ -0,0 +1,12 @@ +require libmodbus.inc + +SRC_URI += "file://f1eb4bc7ccb09cd8d19ab641ee37637f8c34d16d.patch \ + file://Fix-float-endianness-issue-on-big-endian-arch.patch \ + file://Fix-typo.patch" +SRC_URI[md5sum] = "15c84c1f7fb49502b3efaaa668cfd25e" +SRC_URI[sha256sum] = "d7d9fa94a16edb094e5fdf5d87ae17a0dc3f3e3d687fead81835d9572cf87c16" + +# this file has been created one minute after the configure file, so it doesn't get recreated during configure step +do_configure_prepend() { + rm -rf ${S}/tests/unit-test.h +} diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libnss-nisplus/libnss-nisplus.bb b/external/meta-openembedded/meta-oe/recipes-extended/libnss-nisplus/libnss-nisplus.bb new file mode 100644 index 00000000..c9d259b1 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/libnss-nisplus/libnss-nisplus.bb @@ -0,0 +1,31 @@ +# Copyright (C) 2019 Ruslan Bilovol <rbilovol@cisco.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "NSS module for glibc, to provide NIS+ support for glibc" + +DESCRIPTION = "This package contains the NSS NIS+ plugin for glibc.\ +This code was formerly part of glibc, but is now standalone to\ +be able to link against TI-RPC for IPv6 support." + +HOMEPAGE = "https://github.com/thkukuk/libnss_nisplus" +LICENSE = "LGPL-2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" +SECTION = "libs" +DEPENDS += "libtirpc libnsl2" + +PV = "1.3+git${SRCPV}" + +SRCREV = "116219e215858f4af9370171d3ead63baca8fdb4" + +SRC_URI = "git://github.com/thkukuk/libnss_nisplus \ + " + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +BBCLASSEXTEND += "native nativesdk" +# +# We will skip parsing this packagegeoup for non-glibc systems +# +COMPATIBLE_HOST_libc-musl = 'null' diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libpwquality/files/add-missing-python-include-dir-for-cross.patch b/external/meta-openembedded/meta-oe/recipes-extended/libpwquality/files/add-missing-python-include-dir-for-cross.patch index d12492f0..ec867210 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/libpwquality/files/add-missing-python-include-dir-for-cross.patch +++ b/external/meta-openembedded/meta-oe/recipes-extended/libpwquality/files/add-missing-python-include-dir-for-cross.patch @@ -13,28 +13,23 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/Makefile.am b/python/Makefile.am -index abc5cd3..e35ba71 100644 +index 1d00c0c..52816b2 100644 --- a/python/Makefile.am +++ b/python/Makefile.am -@@ -14,4 +14,4 @@ all-local: - CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-lib=. +@@ -14,7 +14,7 @@ all-local: + CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install-exec-local: -- CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py install --prefix=${DESTDIR}${prefix} -+ CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py install --prefix=${DESTDIR}${prefix} --install-lib=${DESTDIR}/${PYTHONSITEDIR} +- CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix} ++ CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix} --install-lib=${DESTDIR}/${PYTHONSITEDIR} + + clean-local: + rm -rf py$(PYTHONREV) diff --git a/python/setup.py.in b/python/setup.py.in -index 6457595..d3db0e5 100755 +index a741b91..6759a95 100755 --- a/python/setup.py.in +++ b/python/setup.py.in -@@ -6,6 +6,7 @@ - - from distutils.core import setup, Extension - from distutils.command.build_ext import build_ext as _build_ext -+import os - - class build_ext(_build_ext): - def genconstants(self, headerfile, outputfile): -@@ -23,7 +24,7 @@ class build_ext(_build_ext): +@@ -33,7 +33,7 @@ class sdist(_sdist): pwqmodule = Extension('pwquality', sources = ['pwquality.c'], @@ -44,5 +39,5 @@ index 6457595..d3db0e5 100755 libraries = ['pwquality']) -- -1.9.1 +2.17.1 diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.0.bb b/external/meta-openembedded/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.2.bb index 9fb25cdc..24d2f7ec 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.0.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.2.bb @@ -9,8 +9,8 @@ SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/${SRCNAME} file://add-missing-python-include-dir-for-cross.patch \ " -SRC_URI[md5sum] = "b8defcc7280a90e9400d6689c93a279c" -SRC_URI[sha256sum] = "1de6ff046cf2172d265a2cb6f8da439d894f3e4e8157b056c515515232fade6b" +SRC_URI[md5sum] = "ae6e61fc33f5dac0de5e847eb7520d71" +SRC_URI[sha256sum] = "5263e09ee62269c092f790ac159112aed3e66826a795e3afec85fdeac4281c8e" UPSTREAM_CHECK_URI = "https://github.com/libpwquality/libpwquality/releases" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libqb/libqb_1.0.3.bb b/external/meta-openembedded/meta-oe/recipes-extended/libqb/libqb_1.0.5.bb index d857344e..cd401966 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/libqb/libqb_1.0.3.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/libqb/libqb_1.0.5.bb @@ -9,11 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=321bf41f280cf805086dd5a720b37785" inherit autotools pkgconfig -PV .= "+git${SRCPV}" - -# v1.0.3 -SRCREV = "28dff090c74b6ba8609c4797294a5afe3fe73987" -SRC_URI = "git://github.com/ClusterLabs/${BPN}.git \ +# v1.0.5 +SRCREV = "d08dbcf08b0da418bce9b5427dfd89522916322a" +SRC_URI = "git://github.com/ClusterLabs/${BPN}.git;branch=version_1 \ file://0001-build-fix-configure-script-neglecting-re-enable-out-.patch \ " S = "${WORKDIR}/git" @@ -24,10 +22,16 @@ S = "${WORKDIR}/git" # WORKDIR/libqb/1.0.3+gitAUTOINC+c235284b5f-r0/recipe-sysroot-native/usr/bin/i586-oe-linux/../../libexec/i586-oe-linux/gcc/i586-oe-linux/8.1.0/ld: error: conftest.ld: SECTIONS seen after other input files; try -T/--script # WORKDIR/libqb/1.0.3+gitAUTOINC+c235284b5f-r0/recipe-sysroot-native/usr/bin/i586-oe-linux/../../libexec/i586-oe-linux/gcc/i586-oe-linux/8.1.0/ld: internal error in write_sections, at ../../gold/reloc.cc:791 # collect2: error: ld returned 1 exit status -EXTRA_OECONF_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' --enable-nosection-fallback', '', d)}" +NOSECTION_FALLBACK = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-nosection-fallback', '', d)}" +NOSECTION_FALLBACK_toolchain-clang_mips64 = "--enable-nosection-fallback" + +EXTRA_OECONF += "${NOSECTION_FALLBACK}" CFLAGS += "-pthread -D_REENTRANT" + do_configure_prepend() { ( cd ${S} ${S}/autogen.sh ) } + +BBCLASSEXTEND = "native" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libreport/libreport_2.9.5.bb b/external/meta-openembedded/meta-oe/recipes-extended/libreport/libreport_2.10.0.bb index 542956cf..4276c491 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/libreport/libreport_2.9.5.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/libreport/libreport_2.10.0.bb @@ -17,13 +17,13 @@ SRC_URI += "file://0001-Makefile.am-remove-doc-and-apidoc.patch \ file://0003-without-build-plugins.patch \ file://0004-configure.ac-remove-prog-test-of-augparse.patch \ " -SRCREV = "15f92bcaf73e5eb8958fbde655a57dcd111757a7" +SRCREV = "eaff08f38d771d9362923765bb404b1514c5ca0a" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" S = "${WORKDIR}/git" -inherit distro_features_check +inherit features_check REQUIRED_DISTRO_FEATURES = "systemd" inherit gettext autotools python3native pkgconfig diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libserialport/libserialport_0.1.1.bb b/external/meta-openembedded/meta-oe/recipes-extended/libserialport/libserialport_0.1.1.bb new file mode 100644 index 00000000..192d4bce --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/libserialport/libserialport_0.1.1.bb @@ -0,0 +1,12 @@ +DESCRIPTION = "libserialport is a minimal, cross-platform shared library written in C that is intended to take care of the OS-specific details when writing software that uses serial ports." +HOMEPAGE = "https://sigrok.org/wiki/Libserialport" + +LICENSE = "LGPL-3.0+" +LIC_FILES_CHKSUM = "file://COPYING;md5=e6a600fd5e1d9cbde2d983680233ad02" + +inherit autotools + +SRC_URI = "http://sigrok.org/download/source/libserialport/libserialport-${PV}.tar.gz" + +SRC_URI[md5sum] = "b93f0325a6157198152b5bd7e8182b51" +SRC_URI[sha256sum] = "4a2af9d9c3ff488e92fb75b4ba38b35bcf9b8a66df04773eba2a7bbf1fa7529d" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libstatgrab/libstatgrab_0.92.bb b/external/meta-openembedded/meta-oe/recipes-extended/libstatgrab/libstatgrab_0.92.bb new file mode 100644 index 00000000..a081cb17 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/libstatgrab/libstatgrab_0.92.bb @@ -0,0 +1,34 @@ +DESCRIPTION = "Utilities to collect and visualise system statistics" +HOMEPAGE = "http://www.i-scream.org/libstatgrab/" + +LICENSE = "GPL-2.0+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "ncurses" + +PACKAGES_prepend = "statgrab statgrab-dbg saidar saidar-dbg ${PN}-mrtg " + +# don't use the git tag unless docbooc2x is available to build the manpages +SRC_URI = "https://github.com/libstatgrab/libstatgrab/releases/download/LIBSTATGRAB_0_92/libstatgrab-0.92.tar.gz \ + " +SRC_URI[md5sum] = "5362b2ddbec54b3901e7d70c22cda249" +SRC_URI[sha256sum] = "5bf1906aff9ffc3eeacf32567270f4d819055d8386d98b9c8c05519012d5a196" + +UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" + +# Perl5 is for tests only +EXTRA_OECONF = "--without-perl5 --with-mnttab=/proc/mounts" + +# use with caution - default properties are configured to trace +PACKAGECONFIG ??= "" +PACKAGECONFIG[log4cplus] = "--with-log4cplus,--without-log4cplus,log4cplus" +PACKAGECONFIG[logging] = "--enable-logging,--disable-logging," + +inherit autotools pkgconfig + +FILES_statgrab = "${bindir}/statgrab" +FILES_statgrab-dbg = "${bindir}/.debug/statgrab" +FILES_saidar = "${bindir}/saidar" +FILES_saidar-dbg = "${bindir}/.debug/saidar" +FILES_${PN}-mrtg = "${bindir}/statgrab-make-mrtg-config ${bindir}/statgrab-make-mrtg-index" +RDEPENDS_${PN}-mrtg_append = "perl statgrab" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libwmf/libwmf_0.2.8.4.bb b/external/meta-openembedded/meta-oe/recipes-extended/libwmf/libwmf_0.2.8.4.bb index 2c31a21c..401c2c4d 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/libwmf/libwmf_0.2.8.4.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/libwmf/libwmf_0.2.8.4.bb @@ -12,7 +12,7 @@ DEPENDS = "freetype libpng jpeg expat gtk+" BBCLASSEXTEND = "native" -inherit distro_features_check autotools pkgconfig +inherit features_check autotools pkgconfig REQUIRED_DISTRO_FEATURES = "x11" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/libzip/libzip_1.6.1.bb b/external/meta-openembedded/meta-oe/recipes-extended/libzip/libzip_1.6.1.bb new file mode 100644 index 00000000..41ad5529 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/libzip/libzip_1.6.1.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "libzip is a C library for reading, creating, and modifying zip archives." +HOMEPAGE = "https://libzip.org/" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e33bb117aa55f9aad3d28e29256f9919" + +DEPENDS = "zlib bzip2" + +PACKAGECONFIG[ssl] = "-DENABLE_OPENSSL=ON,-DENABLE_OPENSSL=OFF,openssl" +PACKAGECONFIG[lzma] = "-DENABLE_LZMA=ON,-DENABLE_LZMA=OFF,xz" + +PACKAGECONFIG ?= "ssl lzma" + +inherit cmake + +SRC_URI = "https://libzip.org/download/libzip-${PV}.tar.xz" + +SRC_URI[md5sum] = "f9a228619aab2446addc9c9e0e2de149" +SRC_URI[sha256sum] = "705dac7a671b3f440181481e607b0908129a9cf1ddfcba75d66436c0e7d33641" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/lockfile-progs/lockfile-progs_0.1.17.bb b/external/meta-openembedded/meta-oe/recipes-extended/lockfile-progs/lockfile-progs_0.1.18.bb index 4354fff9..c76e0f69 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/lockfile-progs/lockfile-progs_0.1.17.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/lockfile-progs/lockfile-progs_0.1.18.bb @@ -9,8 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" DEPENDS = "liblockfile" SRC_URI = "http://ftp.de.debian.org/debian/pool/main/l/${BPN}/${BPN}_${PV}.tar.gz" -SRC_URI[md5sum] = "64424a766fbc8cf6d613fcc14a096e14" -SRC_URI[sha256sum] = "03fb05d25499532f497775b1747b61fa6beebf12d3bcc951e125349ae166c511" +SRC_URI[md5sum] = "4eb83bdf88016db836b7cc09591fb0f3" +SRC_URI[sha256sum] = "a42995a4b97e6188efc90fcc1a761163c4b2cff5c81b936f85c84301ddb05ce6" do_compile() { oe_runmake CFLAGS=' -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables' diff --git a/external/meta-openembedded/meta-oe/recipes-extended/logwatch/logwatch_7.4.3.bb b/external/meta-openembedded/meta-oe/recipes-extended/logwatch/logwatch_7.5.3.bb index aea539ef..644e4207 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/logwatch/logwatch_7.4.3.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/logwatch/logwatch_7.5.3.bb @@ -8,21 +8,21 @@ the package on many systems.\ SECTION = "devel" HOMEPAGE = "http://www.logwatch.org/" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=f2566bb12b16d2d80d90ebc533261aa7" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ad199c8aca74e70f296f731ad9a1521c" RDEPENDS_${PN} = "perl" SRC_URI = "http://jaist.dl.sourceforge.net/project/${BPN}/${BP}/${BP}.tar.gz" -SRC_URI[md5sum] = "22bd22841caa45f12c605abc3e0c2b09" -SRC_URI[sha256sum] = "1dbdc48d65e150f2dbb43f1e4f4700d94166e053b1c7bbbdedf4ad670283720e" +SRC_URI[md5sum] = "8bcf3edc5a4687c8aad1b9c01e2be54b" +SRC_URI[sha256sum] = "1b2b96879dec01cd02754fe00f8989b11ff16158c3dc7c4aff0faa4b1d34974b" do_install() { install -m 0755 -d ${D}${sysconfdir}/logwatch/scripts install -m 0755 -d ${D}${datadir}/logwatch/dist.conf/logfiles install -m 0755 -d ${D}${datadir}/logwatch/dist.conf/services install -m 0755 -d ${D}${localstatedir}/cache/logwatch - mv conf/ ${D}${datadir}/logwatch/default.conf - mv scripts/ ${D}${datadir}/logwatch/scripts - mv lib ${D}${datadir}/logwatch/lib + cp -r -f conf/ ${D}${datadir}/logwatch/default.conf + cp -r -f scripts/ ${D}${datadir}/logwatch/scripts + cp -r -f lib ${D}${datadir}/logwatch/lib chown -R root:root ${D}${datadir}/logwatch install -m 0755 -d ${D}${mandir}/man1 diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview/0001-Fix-formatting-for-modern-c-11-compilers.patch b/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview/0001-Fix-formatting-for-modern-c-11-compilers.patch deleted file mode 100644 index 8b009663..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview/0001-Fix-formatting-for-modern-c-11-compilers.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 90411a7f5e0e9582e79f0a8ccc1e2f158615e451 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 19 May 2018 23:18:11 -0700 -Subject: [PATCH] Fix formatting for modern c++11 compilers - -Fixes -error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/backend/svg/SVG_RenderingContext.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/backend/svg/SVG_RenderingContext.cc b/src/backend/svg/SVG_RenderingContext.cc -index 55d6097..0d50702 100644 ---- a/src/backend/svg/SVG_RenderingContext.cc -+++ b/src/backend/svg/SVG_RenderingContext.cc -@@ -68,7 +68,7 @@ void - SVG_RenderingContext::documentStart(const BoundingBox& bbox) - { - beginDocument(bbox); -- metadata("Created by "PACKAGE" version "VERSION); -+ metadata("Created by " PACKAGE " version " VERSION); - } - - void --- -2.17.0 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview/0001-include-cstdio-to-get-printf-definitions.patch b/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview/0001-include-cstdio-to-get-printf-definitions.patch deleted file mode 100644 index c5814bfe..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview/0001-include-cstdio-to-get-printf-definitions.patch +++ /dev/null @@ -1,28 +0,0 @@ -From c92890c5e18bb6ee23bdb14074bacf306dd9428f Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 5 May 2015 20:35:01 -0700 -Subject: [PATCH] include cstdio to get printf definitions - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/engine/boxml/BoxMLHOVElement.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/engine/boxml/BoxMLHOVElement.cc b/src/engine/boxml/BoxMLHOVElement.cc -index 1a2812c..96c9eea 100644 ---- a/src/engine/boxml/BoxMLHOVElement.cc -+++ b/src/engine/boxml/BoxMLHOVElement.cc -@@ -21,7 +21,7 @@ - // <http://www.gnu.org/licenses/>. - - #include <config.h> -- -+#include <cstdio> - #include "BoxMLAttributeSignatures.hh" - #include "BoxMLHOVElement.hh" - #include "BoxMLHElement.hh" --- -2.1.4 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview/0002-configure.ac-header-detection-of-hash_map-is-broken-.patch b/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview/0002-configure.ac-header-detection-of-hash_map-is-broken-.patch deleted file mode 100644 index b879d6a5..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview/0002-configure.ac-header-detection-of-hash_map-is-broken-.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 9c226fbc6a42540cb492fcfcb81ff16fffb086d6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> -Date: Tue, 30 Aug 2016 23:24:53 +0200 -Subject: [PATCH] configure.ac: header detection of hash_map is broken - pin to - correct implementation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Pending - -Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> ---- - configure.ac | 31 ++++--------------------------- - 1 file changed, 4 insertions(+), 27 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 4f2118e..16c09d5 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -252,35 +252,12 @@ AC_SUBST(GTKMATHVIEW_SIZEOF_WCHAR_T, "$ac_cv_sizeof_wchar_t") - - AC_LANG_PUSH(C++) - --AC_CHECK_HEADERS(unordered_map, -- [ -- AC_DEFINE(GMV_HAVE_UNORDERED_MAP,1,[Define if <unordered_map> is provided]) -- GMV_HAVE_UNORDERED_MAP_CFLAGS=-DGMV_HAVE_UNORDERED_MAP=1 -- ], -- [ -- GMV_HAVE_UNORDERED_MAP_CFLAGS= -- ] --) -+GMV_HAVE_UNORDERED_MAP_CFLAGS= - AC_SUBST(GMV_HAVE_UNORDERED_MAP_CFLAGS) --AC_CHECK_HEADERS(hash_map, -- [ -- AC_DEFINE(GMV_HAVE_HASH_MAP,1,[Define if <hash_map> is provided]) -- GMV_HAVE_HASH_MAP_CFLAGS=-DGMV_HAVE_HASH_MAP=1 -- ], -- [ -- GMV_HAVE_HASH_MAP_CFLAGS= -- ] --) -+GMV_HAVE_HASH_MAP_CFLAGS= - AC_SUBST(GMV_HAVE_HASH_MAP_CFLAGS) --AC_CHECK_HEADERS(ext/hash_map, -- [ -- AC_DEFINE(GMV_HAVE_EXT_HASH_MAP,1,[Define if <ext/hash_map> is provided]) -- GMV_HAVE_EXT_HASH_MAP_CFLAGS=-DGMV_HAVE_EXT_HASH_MAP=1 -- ], -- [ -- GMV_HAVE_EXT_HASH_MAP_CFLAGS= -- ] --) -+AC_DEFINE(GMV_HAVE_EXT_HASH_MAP,1,[Define if <ext/hash_map> is provided]) -+GMV_HAVE_EXT_HASH_MAP_CFLAGS=-DGMV_HAVE_EXT_HASH_MAP=1 - AC_SUBST(GMV_HAVE_EXT_HASH_MAP_CFLAGS) - - AC_MSG_CHECKING([whether the C++ compiler supports the standard character traits]) --- -2.5.5 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview/0003-gcc-6.0-build-fixes.patch b/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview/0003-gcc-6.0-build-fixes.patch deleted file mode 100644 index 356274d1..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview/0003-gcc-6.0-build-fixes.patch +++ /dev/null @@ -1,93 +0,0 @@ -From: Gert Wollny <gw.fossdev@gmail.com> -Date: Sun, 26 Jun 2016 13:25:00 +0200 -Description: gcc 6.0 build fixes -Bug: https://bugs.debian.org/811682 - -Slightly adapted to our environment - -Upstream-Status: Pending - -Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> ---- a/src/engine/common/View.cc -+++ b/src/engine/common/View.cc -@@ -291,7 +291,7 @@ - } - } - -- return false; -+ return SmartPtr<Element>(); - } - - bool ---- a/src/backend/common/tfm/TFM.hh -+++ b/src/backend/common/tfm/TFM.hh -@@ -37,7 +37,7 @@ - unsigned char face; - const char* codingScheme; - int designSize; -- int checksum; -+ unsigned int checksum; - unsigned int nDimensions; - unsigned int nCharacters; - }; -@@ -52,7 +52,7 @@ - struct Kerning - { - UChar8 index; -- int value; -+ unsigned int value; - }; - - struct Ligature -@@ -67,7 +67,7 @@ - UChar8 index; - int width; - int height; -- int depth; -+ unsigned int depth; - int italicCorrection; - unsigned char nKernings; - const Kerning* kerning; ---- a/src/backend/common/StandardSymbolsShaper.hh -+++ b/src/backend/common/StandardSymbolsShaper.hh -@@ -32,20 +32,20 @@ - struct HStretchyChar - { - Char16 ch; -- Char8 normal; -- Char8 left; -- Char8 glue; -- Char8 right; -+ UChar8 normal; -+ UChar8 left; -+ UChar8 glue; -+ UChar8 right; - }; - - struct VStretchyChar - { - Char16 ch; -- Char8 normal; -- Char8 top; -- Char8 glue; -- Char8 middle; -- Char8 bottom; -+ UChar8 normal; -+ UChar8 top; -+ UChar8 glue; -+ UChar8 middle; -+ UChar8 bottom; - }; - - protected: ---- a/src/backend/common/StandardSymbolsShaper.cc -+++ b/src/backend/common/StandardSymbolsShaper.cc -@@ -29,7 +29,7 @@ - #include "ShapingContext.hh" - - struct GlyphMap { -- Char8 index; -+ UChar8 index; - Char16 ch; - }; - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview/use_hostcxx.patch b/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview/use_hostcxx.patch deleted file mode 100644 index 3fe63286..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview/use_hostcxx.patch +++ /dev/null @@ -1,18 +0,0 @@ -Use build_cc to compile the programs to run on build host -helps with cross compiling - -Upstream-Status: Inappropriate [Cross-compiled OE specific] - -diff --git a/src/common/mathvariants/Makefile.am b/src/common/mathvariants/Makefile.am -index 636ccf0..ed9921d 100644 ---- a/src/common/mathvariants/Makefile.am -+++ b/src/common/mathvariants/Makefile.am -@@ -52,7 +52,7 @@ XSLTPROC = xsltproc - %.cc : %_gen.cc $(srcdir)/variant.top $(srcdir)/variant.bot - cat $(srcdir)/variant.top >$@ - $(XSLTPROC) --novalid --param temp "false()" $(srcdir)/extract.xsl $(<:%_gen.cc=$(srcdir)/xml/%.xml) >>$@ -- $(CXX) -o $(@:%.cc=%) -I$(top_builddir)/auto $< -+ $(BUILD_CXX) -o $(@:%.cc=%) -I$(top_builddir)/auto $< - echo "Char32 " >>$@ - basename map_variant_$@ .cc | tr "-" "_" >>$@ - echo "(Char32 ch)" >>$@ diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview_0.8.0.bb b/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview_0.8.0.bb deleted file mode 100644 index 9ee9e303..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mml-widget/gtkmathview_0.8.0.bb +++ /dev/null @@ -1,28 +0,0 @@ -HOMEPAGE = "http://helm.cs.unibo.it/mml-widget/" -DEPENDS = "t1lib gtk+ popt libxslt-native libxml2" - -LICENSE = "LGPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=6a6a8e020838b23406c81b19c1d46df6" - -PR = "r3" -SRCREV = "0bc2cfa0a47aed2c8a63abd989cb8da4dcceb2ec" -PV = "0.8.0+git${SRCPV}" - -SRC_URI = "git://github.com/GNOME/gtkmathview.git \ - file://use_hostcxx.patch \ - file://0001-include-cstdio-to-get-printf-definitions.patch \ - file://0002-configure.ac-header-detection-of-hash_map-is-broken-.patch \ - file://0003-gcc-6.0-build-fixes.patch \ - file://0001-Fix-formatting-for-modern-c-11-compilers.patch \ -" - -S = "${WORKDIR}/git" - -inherit distro_features_check autotools pkgconfig - -REQUIRED_DISTRO_FEATURES = "x11" - -do_configure_append() { - # avoid host polution inf pkg-config files - sed -i "s:${STAGING_DIR_HOST}::g" `find -name '*.pc'` -} diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0001-do-not-create-python-environment.patch b/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0001-do-not-create-python-environment.patch deleted file mode 100644 index ba317bc0..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0001-do-not-create-python-environment.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 5028d1cd669c179ed49061316d04c8e8862a5bd8 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Thu, 12 Jul 2018 15:04:47 +0800 -Subject: [PATCH 1/5] do not create python environment - -Use oe's python environment rather than create one of host - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - build/moz.configure/init.configure | 18 ------------------ - configure.py | 10 +++++++++- - js/src/old-configure | 4 ++-- - 3 files changed, 11 insertions(+), 21 deletions(-) - -diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure -index 2123beb..6fe6591 100644 ---- a/build/moz.configure/init.configure -+++ b/build/moz.configure/init.configure -@@ -179,24 +179,6 @@ def virtualenv_python(env_python, build_env, mozconfig, help): - else: - python = sys.executable - -- if not manager.up_to_date(python): -- log.info('Creating Python environment') -- manager.build(python) -- -- python = normsep(manager.python_path) -- -- if python != normsep(sys.executable): -- log.info('Reexecuting in the virtualenv') -- if env_python: -- del os.environ['PYTHON'] -- # One would prefer to use os.execl, but that's completely borked on -- # Windows. -- sys.exit(subprocess.call([python] + sys.argv)) -- -- # We are now in the virtualenv -- if not distutils.sysconfig.get_python_lib(): -- die('Could not determine python site packages directory') -- - return python - - set_config('PYTHON', virtualenv_python) -diff --git a/configure.py b/configure.py -index f7392d0..45323a5 100644 ---- a/configure.py -+++ b/configure.py -@@ -12,7 +12,15 @@ import textwrap - - - base_dir = os.path.abspath(os.path.dirname(__file__)) --sys.path.insert(0, os.path.join(base_dir, 'python', 'mozbuild')) -+sys.path.insert(0, os.path.join(base_dir, 'config')) -+def get_immediate_subdirectories(a_dir): -+ return [name for name in os.listdir(a_dir) -+ if os.path.isdir(os.path.join(a_dir, name))] -+for s in ["python", "testing/mozbase"]: -+ sub_dir = os.path.join(base_dir, s) -+ for module_dir in get_immediate_subdirectories(sub_dir): -+ sys.path.insert(0, os.path.join(sub_dir, module_dir)) -+ - from mozbuild.configure import ConfigureSandbox - from mozbuild.util import ( - indented_repr, -diff --git a/js/src/old-configure b/js/src/old-configure -index ee4527b..75b00e1 100644 ---- a/js/src/old-configure -+++ b/js/src/old-configure -@@ -10512,7 +10512,7 @@ if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then - ;; - esac - -- eval $dumpenv $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args -+ eval $dumpenv PYTHONPATH=$_topsrcdir/python/mozbuild/ $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args - - done - -@@ -10931,7 +10931,7 @@ if test "$JS_STANDALONE"; then - - if test "$no_recursion" != yes; then - trap '' EXIT -- if ! $PYTHON $_topsrcdir/build/subconfigure.py --list subconfigures --skip skip_subconfigures; then -+ if ! PYTHONPATH=$_topsrcdir/python/mozbuild/ $PYTHON $_topsrcdir/build/subconfigure.py --list subconfigures --skip skip_subconfigures; then - exit 1 - fi - fi --- -2.7.4 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0001-fix-compiling-failure-on-mips64-n32-bsp.patch b/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0001-fix-compiling-failure-on-mips64-n32-bsp.patch deleted file mode 100644 index bc1af3c7..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0001-fix-compiling-failure-on-mips64-n32-bsp.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 5ad700c92224193bfc789f7d53af38fc6f8b8904 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Thu, 19 Jul 2018 17:31:35 +0800 -Subject: [PATCH] fix compiling failure on mips64-n32 bsp - -- Tweak mips64-n32 with mips32 - -- The toolchain of mips64-n32 supports both of macro - `__mips64' and `__mips__', but 32bit is required here. - -- N32 uses 64-bit registers but restricts addresses to 32 bits. - https://www.linux-mips.org/pub/linux/mips/doc/ABI/MIPS-N32-ABI-Handbook.pdf - Table 2-1 specifies the use of registers in n32 and native 64-bit mode. - From the table, N32 and N64 have the same registers - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - build/moz.configure/init.configure | 5 ++++- - js/src/jit/mips-shared/Architecture-mips-shared.h | 4 +++- - python/mozbuild/mozbuild/configure/constants.py | 2 +- - 3 files changed, 8 insertions(+), 3 deletions(-) - -diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure -index 6fe6591..a77b46c 100644 ---- a/build/moz.configure/init.configure -+++ b/build/moz.configure/init.configure -@@ -357,7 +357,10 @@ def split_triplet(triplet): - canonical_cpu = 'mips32' - endianness = 'little' if 'el' in cpu else 'big' - elif cpu in ('mips64', 'mips64el'): -- canonical_cpu = 'mips64' -+ if 'n32' in triplet: -+ canonical_cpu = 'mips32' -+ else: -+ canonical_cpu = 'mips64' - endianness = 'little' if 'el' in cpu else 'big' - elif cpu.startswith('aarch64'): - canonical_cpu = 'aarch64' -diff --git a/js/src/jit/mips-shared/Architecture-mips-shared.h b/js/src/jit/mips-shared/Architecture-mips-shared.h -index 7afe305..c6e29dc 100644 ---- a/js/src/jit/mips-shared/Architecture-mips-shared.h -+++ b/js/src/jit/mips-shared/Architecture-mips-shared.h -@@ -24,6 +24,8 @@ - #define USES_O32_ABI - #elif (defined(_MIPS_SIM) && (_MIPS_SIM == _ABI64)) || defined(JS_SIMULATOR_MIPS64) - #define USES_N64_ABI -+#elif (defined(_MIPS_SIM) && (_MIPS_SIM == _ABIN32)) -+#define USES_N32_ABI - #else - #error "Unsupported ABI" - #endif -@@ -91,7 +93,7 @@ class Registers - ta1 = t5, - ta2 = t6, - ta3 = t7, --#elif defined(USES_N64_ABI) -+#elif defined(USES_N64_ABI) || defined(USES_N32_ABI) - a4 = r8, - a5 = r9, - a6 = r10, -diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py -index dfc7cf8..27f83ab 100644 ---- a/python/mozbuild/mozbuild/configure/constants.py -+++ b/python/mozbuild/mozbuild/configure/constants.py -@@ -83,8 +83,8 @@ CPU_preprocessor_checks = OrderedDict(( - ('hppa', '__hppa__'), - ('sparc64', '__sparc__ && __arch64__'), - ('sparc', '__sparc__'), -- ('mips64', '__mips64'), - ('mips32', '__mips__'), -+ ('mips64', '__mips64'), - )) - - assert sorted(CPU_preprocessor_checks.keys()) == sorted(CPU.POSSIBLE_VALUES) --- -2.7.4 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch b/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch deleted file mode 100644 index c111ea5e..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0a61b0b98c152f10404ccbdeeac583a486638a7a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> -Date: Thu, 6 Jun 2013 18:36:01 +0200 -Subject: [PATCH] js.pc.in: do not include RequiredDefines.h for depending - packages - -in our cross environment the would fail with: - -| cc1: fatal error: /usr/include/js-17.0/js/RequiredDefines.h: No such file or directory - -and currently it only defines __STDC_LIMIT_MACROS -Upstream-Status: Inappropriate [embedded specific] -Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> - -Rebase to 52.8.1 -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - js/src/js.pc.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/js/src/js.pc.in b/js/src/js.pc.in -index 2eae393..c2dea62 100644 ---- a/js/src/js.pc.in -+++ b/js/src/js.pc.in -@@ -8,4 +8,4 @@ Description: The Mozilla library for JavaScript - Version: @MOZILLA_VERSION@ - @PKGCONF_REQUIRES_PRIVATE@ - Libs: -L${libdir} -l@JS_LIBRARY_NAME@ --Cflags: -include ${includedir}/@JS_LIBRARY_NAME@/js/RequiredDefines.h -I${includedir}/@JS_LIBRARY_NAME@ -+Cflags: -I${includedir}/@JS_LIBRARY_NAME@ --- -2.7.4 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0001-mozjs-fix-coredump-caused-by-getenv.patch b/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0001-mozjs-fix-coredump-caused-by-getenv.patch deleted file mode 100644 index 477f73a2..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0001-mozjs-fix-coredump-caused-by-getenv.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 20b639b7364f9953fdacb058f9ba800bcbf029b4 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Thu, 2 Aug 2018 09:40:48 +0800 -Subject: [PATCH] mozjs: fix coredump caused by getenv - -Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1480315] - -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - mozglue/misc/TimeStamp.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/mozglue/misc/TimeStamp.cpp b/mozglue/misc/TimeStamp.cpp -index 932b75c..7a4d71b 100644 ---- a/mozglue/misc/TimeStamp.cpp -+++ b/mozglue/misc/TimeStamp.cpp -@@ -11,6 +11,7 @@ - #include "mozilla/TimeStamp.h" - #include <stdio.h> - #include <string.h> -+#include <stdlib.h> - - namespace mozilla { - --- -2.7.4 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0002-fix-cannot-find-link.patch b/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0002-fix-cannot-find-link.patch deleted file mode 100644 index 4f7ebc68..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0002-fix-cannot-find-link.patch +++ /dev/null @@ -1,34 +0,0 @@ -From e6dcee5f8a0f80ce99946b81fa1233611a149fe6 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Thu, 12 Jul 2018 18:00:52 +0800 -Subject: [PATCH 2/5] fix cannot find link - -.. -|DEBUG: link: Trying 'mips64-wrs-linux-ld --sysroot=tmp-glibc/work/ -mips64-wrs-linux/mozjs/52.8.1-r0/recipe-sysroot ' -|ERROR: Cannot find link -... - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - build/moz.configure/checks.configure | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/moz.configure/checks.configure b/build/moz.configure/checks.configure -index 8c2dbc0..83bffc3 100644 ---- a/build/moz.configure/checks.configure -+++ b/build/moz.configure/checks.configure -@@ -128,7 +128,7 @@ def check_prog(var, progs, what=None, input=None, allow_missing=False, - - for prog in value or progs: - log.debug('%s: Trying %s', var.lower(), quote(prog)) -- result = find_program(prog, paths) -+ result = find_program(prog.split()[0], paths) - if result: - return result - --- -2.7.4 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0003-workaround-autoconf-2.13-detection-failed.patch b/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0003-workaround-autoconf-2.13-detection-failed.patch deleted file mode 100644 index a754ff16..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0003-workaround-autoconf-2.13-detection-failed.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 646a78262b18e19721cd41ee515215221dd241b6 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Thu, 12 Jul 2018 18:12:42 +0800 -Subject: [PATCH 3/5] workaround autoconf 2.13 detection failed - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - build/moz.configure/old.configure | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure -index b32c3f7..ece47f4 100644 ---- a/build/moz.configure/old.configure -+++ b/build/moz.configure/old.configure -@@ -31,7 +31,7 @@ def autoconf(mozconfig, autoconf): - autoconf = autoconf[0] if autoconf else None - - for ac in (mozconfig_autoconf, autoconf, 'autoconf-2.13', 'autoconf2.13', -- 'autoconf213'): -+ 'autoconf213', 'autoconf'): - if ac: - autoconf = find_program(ac) - if autoconf: --- -2.7.4 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0004-do-not-use-autoconf-2.13-to-refresh-old.configure.patch b/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0004-do-not-use-autoconf-2.13-to-refresh-old.configure.patch deleted file mode 100644 index 4cba79c5..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0004-do-not-use-autoconf-2.13-to-refresh-old.configure.patch +++ /dev/null @@ -1,42 +0,0 @@ -From a46adb74b5ba5e17d676d31d70faca76c1381d15 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Thu, 12 Jul 2018 21:25:46 +0800 -Subject: [PATCH 4/5] do not use autoconf 2.13 to refresh old.configure - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - build/moz.configure/old.configure | 2 +- - js/src/old-configure | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure -index ece47f4..a73900f 100644 ---- a/build/moz.configure/old.configure -+++ b/build/moz.configure/old.configure -@@ -83,7 +83,7 @@ def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell, - old_configure = os.path.join(old_configure_dir, 'js', 'src', - os.path.basename(old_configure)) - -- refresh = True -+ refresh = False - if exists(old_configure): - mtime = getmtime(old_configure) - aclocal = os.path.join(build_env.topsrcdir, 'build', 'autoconf', -diff --git a/js/src/old-configure b/js/src/old-configure -index 75b00e1..8a8ef52 100644 ---- a/js/src/old-configure -+++ b/js/src/old-configure -@@ -619,7 +619,7 @@ if test -z "$srcdir"; then - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. -- srcdir=$ac_confdir -+ srcdir="$ac_confdir/../../" - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi --- -2.7.4 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0005-fix-do_compile-failed-on-mips.patch b/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0005-fix-do_compile-failed-on-mips.patch deleted file mode 100644 index 38e4698f..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0005-fix-do_compile-failed-on-mips.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 55d833dc3c194f1eb7841f308ad3b9ec3800d3b3 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Fri, 13 Jul 2018 15:48:32 +0800 -Subject: [PATCH 5/5] fix do_compile failed on mips - -Link with var-OS_LDFLAGS to fix the issue. -Such as on mips: -... -|mips-wrsmllib32-linux-g++ -meb -mabi=32 -mhard-float ... -o libmozjs-52.so -|/usr/include/c++/8.1.0/bits/atomic_base.h:514: error: undefined -reference to '__atomic_fetch_add_8' -... - -In recipe, set OS_LDFLAGS="-Wl,-latomic" could fix the issue. - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - config/config.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/config/config.mk b/config/config.mk -index 4e3fd1a..d847ffa 100644 ---- a/config/config.mk -+++ b/config/config.mk -@@ -523,7 +523,7 @@ EXPAND_MKSHLIB_ARGS = --uselist - ifdef SYMBOL_ORDER - EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER) - endif --EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB) -+EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB) $(OS_LDFLAGS) - - # $(call CHECK_SYMBOLS,lib,PREFIX,dep_name,test) - # Checks that the given `lib` doesn't contain dependency on symbols with a --- -2.7.4 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0006-support-musl.patch b/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0006-support-musl.patch deleted file mode 100644 index 32a977ce..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0006-support-musl.patch +++ /dev/null @@ -1,158 +0,0 @@ -From 04e8a611e958f0da1ccac61acae3a6f1a5168b20 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Fri, 13 Jul 2018 18:08:14 +0800 -Subject: [PATCH] support musl - -Upstream-Status: Pending - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - memory/jemalloc/src/src/pages.c | 1 - - memory/mozjemalloc/jemalloc.c | 7 +++---- - mozglue/misc/TimeStamp_darwin.cpp | 1 - - mozglue/misc/TimeStamp_posix.cpp | 1 - - nsprpub/pr/src/misc/prsystem.c | 1 - - python/psutil/psutil/_psutil_bsd.c | 1 - - python/psutil/psutil/_psutil_osx.c | 1 - - python/psutil/psutil/arch/bsd/process_info.c | 1 - - python/psutil/psutil/arch/osx/process_info.c | 1 - - 9 files changed, 3 insertions(+), 12 deletions(-) - -diff --git a/memory/jemalloc/src/src/pages.c b/memory/jemalloc/src/src/pages.c -index 647952a..7b964c8 100644 ---- a/memory/jemalloc/src/src/pages.c -+++ b/memory/jemalloc/src/src/pages.c -@@ -2,7 +2,6 @@ - #include "jemalloc/internal/jemalloc_internal.h" - - #ifdef JEMALLOC_SYSCTL_VM_OVERCOMMIT --#include <sys/sysctl.h> - #endif - - /******************************************************************************/ -diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c -index 5d4d83a..c618de9 100644 ---- a/memory/mozjemalloc/jemalloc.c -+++ b/memory/mozjemalloc/jemalloc.c -@@ -332,7 +332,6 @@ __FBSDID("$FreeBSD: head/lib/libc/stdlib/malloc.c 180599 2008-07-18 19:35:44Z ja - #include <sys/time.h> - #include <sys/types.h> - #if !defined(MOZ_MEMORY_SOLARIS) && !defined(MOZ_MEMORY_ANDROID) --#include <sys/sysctl.h> - #endif - #include <sys/uio.h> - #ifndef MOZ_MEMORY -@@ -674,7 +673,7 @@ static bool malloc_initialized = false; - #elif defined(MOZ_MEMORY_DARWIN) - static malloc_mutex_t init_lock = {OS_SPINLOCK_INIT}; - #elif defined(MOZ_MEMORY_LINUX) && !defined(MOZ_MEMORY_ANDROID) --static malloc_mutex_t init_lock = PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP; -+static malloc_mutex_t init_lock = PTHREAD_MUTEX_INITIALIZER; - #elif defined(MOZ_MEMORY) - static malloc_mutex_t init_lock = PTHREAD_MUTEX_INITIALIZER; - #else -@@ -1644,7 +1643,7 @@ malloc_mutex_init(malloc_mutex_t *mutex) - pthread_mutexattr_t attr; - if (pthread_mutexattr_init(&attr) != 0) - return (true); -- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP); -+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_STALLED); - if (pthread_mutex_init(mutex, &attr) != 0) { - pthread_mutexattr_destroy(&attr); - return (true); -@@ -1709,7 +1708,7 @@ malloc_spin_init(malloc_spinlock_t *lock) - pthread_mutexattr_t attr; - if (pthread_mutexattr_init(&attr) != 0) - return (true); -- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP); -+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_STALLED); - if (pthread_mutex_init(lock, &attr) != 0) { - pthread_mutexattr_destroy(&attr); - return (true); -diff --git a/mozglue/misc/TimeStamp_darwin.cpp b/mozglue/misc/TimeStamp_darwin.cpp -index f30bc98..3998c9c 100644 ---- a/mozglue/misc/TimeStamp_darwin.cpp -+++ b/mozglue/misc/TimeStamp_darwin.cpp -@@ -18,7 +18,6 @@ - - #include <mach/mach_time.h> - #include <sys/time.h> --#include <sys/sysctl.h> - #include <time.h> - #include <unistd.h> - -diff --git a/mozglue/misc/TimeStamp_posix.cpp b/mozglue/misc/TimeStamp_posix.cpp -index 05dedde..d9e30f2 100644 ---- a/mozglue/misc/TimeStamp_posix.cpp -+++ b/mozglue/misc/TimeStamp_posix.cpp -@@ -21,7 +21,6 @@ - #if defined(__DragonFly__) || defined(__FreeBSD__) \ - || defined(__NetBSD__) || defined(__OpenBSD__) - #include <sys/param.h> --#include <sys/sysctl.h> - #endif - - #if defined(__DragonFly__) || defined(__FreeBSD__) -diff --git a/nsprpub/pr/src/misc/prsystem.c b/nsprpub/pr/src/misc/prsystem.c -index eba85fb..54b57bb 100644 ---- a/nsprpub/pr/src/misc/prsystem.c -+++ b/nsprpub/pr/src/misc/prsystem.c -@@ -27,7 +27,6 @@ - || defined(OPENBSD) || defined(DRAGONFLY) || defined(DARWIN) - #define _PR_HAVE_SYSCTL - #include <sys/param.h> --#include <sys/sysctl.h> - #endif - - #if defined(DARWIN) -diff --git a/python/psutil/psutil/_psutil_bsd.c b/python/psutil/psutil/_psutil_bsd.c -index 7b6e561..0a91262 100644 ---- a/python/psutil/psutil/_psutil_bsd.c -+++ b/python/psutil/psutil/_psutil_bsd.c -@@ -16,7 +16,6 @@ - #include <fcntl.h> - #include <paths.h> - #include <sys/types.h> --#include <sys/sysctl.h> - #include <sys/param.h> - #include <sys/user.h> - #include <sys/proc.h> -diff --git a/python/psutil/psutil/_psutil_osx.c b/python/psutil/psutil/_psutil_osx.c -index 3ebf8ff..b3910ba 100644 ---- a/python/psutil/psutil/_psutil_osx.c -+++ b/python/psutil/psutil/_psutil_osx.c -@@ -13,7 +13,6 @@ - #include <stdlib.h> - #include <stdio.h> - #include <utmpx.h> --#include <sys/sysctl.h> - #include <sys/vmmeter.h> - #include <libproc.h> - #include <sys/proc_info.h> -diff --git a/python/psutil/psutil/arch/bsd/process_info.c b/python/psutil/psutil/arch/bsd/process_info.c -index 4d73924..46f288d 100644 ---- a/python/psutil/psutil/arch/bsd/process_info.c -+++ b/python/psutil/psutil/arch/bsd/process_info.c -@@ -15,7 +15,6 @@ - #include <stdio.h> - #include <string.h> - #include <sys/types.h> --#include <sys/sysctl.h> - #include <sys/param.h> - #include <sys/user.h> - #include <sys/proc.h> -diff --git a/python/psutil/psutil/arch/osx/process_info.c b/python/psutil/psutil/arch/osx/process_info.c -index b6dd5bb..62a838f 100644 ---- a/python/psutil/psutil/arch/osx/process_info.c -+++ b/python/psutil/psutil/arch/osx/process_info.c -@@ -16,7 +16,6 @@ - #include <stdlib.h> - #include <stdio.h> - #include <signal.h> --#include <sys/sysctl.h> - #include <libproc.h> - - #include "process_info.h" --- -2.7.4 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0010-fix-cross-compilation-on-i586-targets.patch b/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0010-fix-cross-compilation-on-i586-targets.patch deleted file mode 100644 index 9194e346..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0010-fix-cross-compilation-on-i586-targets.patch +++ /dev/null @@ -1,35 +0,0 @@ -From a452138a1dd274bfad381a701729783360dc86fb Mon Sep 17 00:00:00 2001 -From: Maciej Borzecki <maciej.borzecki@open-rnd.pl> -Date: Tue, 5 Jan 2016 22:04:17 +0100 -Subject: [PATCH] fix cross compilation on i586 targets - -Remove offending -Wl,-rpath-link that may cause host libraries to be picked -during linking. The patch applies a fix to configure.in. So as not to -regenerate configure, similar fix is applied there. - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl> - -Rebase to 52.8.1 -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - js/src/old-configure | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/js/src/old-configure b/js/src/old-configure -index 8a8ef52..d7afcff 100644 ---- a/js/src/old-configure -+++ b/js/src/old-configure -@@ -3964,7 +3964,7 @@ IMPORT_LIB_SUFFIX= - DIRENT_INO=d_ino - MOZ_USER_DIR=".mozilla" - --MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin -Wl,-rpath-link,${prefix}/lib" -+MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin" - - - --- -2.7.4 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/JS_PUBLIC_API.patch b/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/JS_PUBLIC_API.patch deleted file mode 100644 index 6c87ff2a..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/JS_PUBLIC_API.patch +++ /dev/null @@ -1,37 +0,0 @@ -Patch from https://bugzilla.mozilla.org/show_bug.cgi?id=1426865 - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1426865] ---- a/js/public/TypeDecls.h -+++ b/js/public/TypeDecls.h -@@ -21,22 +21,23 @@ - #include <stdint.h> - - #include "js-config.h" -+#include "jstypes.h" - - struct JSContext; --class JSFunction; -+class JS_PUBLIC_API(JSFunction); - class JSObject; --class JSScript; --class JSString; --class JSAddonId; -+class JS_PUBLIC_API(JSScript); -+class JS_PUBLIC_API(JSString); -+class JS_PUBLIC_API(JSAddonId); - --struct jsid; -+struct JS_PUBLIC_API(jsid); - - namespace JS { - - typedef unsigned char Latin1Char; - --class Symbol; --class Value; -+class JS_PUBLIC_API(Symbol); -+class JS_PUBLIC_API(Value); - template <typename T> class Handle; - template <typename T> class MutableHandle; - template <typename T> class Rooted; diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/add-riscv-support.patch b/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/add-riscv-support.patch deleted file mode 100644 index 4354a9de..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/add-riscv-support.patch +++ /dev/null @@ -1,70 +0,0 @@ -Add RISC-V support - -Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1318905] - -Signed-off-by: Ricardo Salveti <ricardo@foundries.io> - -diff --git a/build/autoconf/config.guess b/build/autoconf/config.guess -index d5d667d..1277a86 100755 ---- a/build/autoconf/config.guess -+++ b/build/autoconf/config.guess -@@ -1029,6 +1029,9 @@ EOF - ppcle:Linux:*:*) - echo powerpcle-unknown-linux-${LIBC} - exit ;; -+ riscv32:Linux:*:* | riscv64:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} - exit ;; -diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure -index 6fe6591..56e6730 100644 ---- a/build/moz.configure/init.configure -+++ b/build/moz.configure/init.configure -@@ -362,6 +362,9 @@ def split_triplet(triplet): - elif cpu.startswith('aarch64'): - canonical_cpu = 'aarch64' - endianness = 'little' -+ elif cpu in ('riscv32', 'riscv64'): -+ canonical_cpu = cpu -+ endianness = 'little' - else: - die('Unknown CPU type: %s' % cpu) - -diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h -index 15dd4bf..4f37218 100644 ---- a/mfbt/double-conversion/utils.h -+++ b/mfbt/double-conversion/utils.h -@@ -60,7 +60,8 @@ - defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ - defined(__SH4__) || defined(__alpha__) || \ - defined(_MIPS_ARCH_MIPS32R2) || \ -- defined(__AARCH64EL__) || defined(__aarch64__) -+ defined(__AARCH64EL__) || defined(__aarch64__) || \ -+ defined(__riscv) - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) - #if defined(_WIN32) -diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py -index dfc7cf8..4f8d666 100644 ---- a/python/mozbuild/mozbuild/configure/constants.py -+++ b/python/mozbuild/mozbuild/configure/constants.py -@@ -48,6 +48,8 @@ CPU_bitness = { - 'mips64': 64, - 'ppc': 32, - 'ppc64': 64, -+ 'riscv32': 32, -+ 'riscv64': 64, - 's390': 32, - 's390x': 64, - 'sparc': 32, -@@ -79,6 +81,8 @@ CPU_preprocessor_checks = OrderedDict(( - ('s390', '__s390__'), - ('ppc64', '__powerpc64__'), - ('ppc', '__powerpc__'), -+ ('riscv32', '__riscv && __SIZEOF_POINTER__ == 4'), -+ ('riscv64', '__riscv && __SIZEOF_POINTER__ == 8'), - ('Alpha', '__alpha__'), - ('hppa', '__hppa__'), - ('sparc64', '__sparc__ && __arch64__'), diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/disable-mozglue-in-stand-alone-builds.patch b/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/disable-mozglue-in-stand-alone-builds.patch deleted file mode 100644 index 5487cdbe..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/disable-mozglue-in-stand-alone-builds.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 2fb531ac753500314336ccd508cb2d53f5e768e5 Mon Sep 17 00:00:00 2001 -From: Till Schneidereit <till@tillschneidereit.net> -Date: Thu, 1 Oct 2015 12:59:09 +0200 -Subject: Disable MOZ_GLUE_IN_PROGRAM in stand-alone builds on all platforms - -Otherwise, build fails not being able to find HashBytes. - -Patch ported forward to mozjs52 by Philip Chimento -<philip.chimento@gmail.com>. - -https://bugzilla.mozilla.org/show_bug.cgi?id=1176787 - -Upstream-Status: Backport - -Signed-off-by: Ricardo Salveti <ricardo@foundries.io> ---- - js/src/old-configure | 20 ++++++++++++-------- - mozglue/build/moz.build | 2 +- - 2 files changed, 13 insertions(+), 9 deletions(-) - -diff --git a/js/src/old-configure b/js/src/old-configure -index d7afcff..8a6f142 100644 ---- a/js/src/old-configure -+++ b/js/src/old-configure -@@ -8546,21 +8546,25 @@ if test -z "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then - fi - - --case "${OS_TARGET}" in --Android|WINNT|Darwin) -+if test "$JS_STANDALONE"; then - MOZ_GLUE_IN_PROGRAM= -- ;; --*) -- MOZ_GLUE_IN_PROGRAM=1 -- cat >> confdefs.pytmp <<\EOF -+else -+ case "${OS_TARGET}" in -+ Android|WINNT|Darwin) -+ MOZ_GLUE_IN_PROGRAM= -+ ;; -+ *) -+ MOZ_GLUE_IN_PROGRAM=1 -+ cat >> confdefs.pytmp <<\EOF - (''' MOZ_GLUE_IN_PROGRAM ''', ' 1 ') - EOF - cat >> confdefs.h <<\EOF - #define MOZ_GLUE_IN_PROGRAM 1 - EOF - -- ;; --esac -+ ;; -+ esac -+fi - - if test "$MOZ_MEMORY"; then - if test "x$MOZ_DEBUG" = "x1"; then -diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build -index d289747..e3be5a2 100644 ---- a/mozglue/build/moz.build -+++ b/mozglue/build/moz.build -@@ -6,7 +6,7 @@ - - # Build mozglue as a shared lib on Windows, OSX and Android. - # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in --if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'): -+if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') and not CONFIG['JS_STANDALONE']: - SharedLibrary('mozglue') - else: - Library('mozglue') --- -2.7.4 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs_52.9.1.bb b/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs_52.9.1.bb deleted file mode 100644 index 7c8a7aee..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs_52.9.1.bb +++ /dev/null @@ -1,112 +0,0 @@ -SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++" -HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" -LICENSE = "MPL-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad" - -SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/m/mozjs52/mozjs52_52.9.1.orig.tar.xz \ - file://0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \ - file://0010-fix-cross-compilation-on-i586-targets.patch \ - file://0001-do-not-create-python-environment.patch \ - file://0002-fix-cannot-find-link.patch \ - file://0003-workaround-autoconf-2.13-detection-failed.patch \ - file://0004-do-not-use-autoconf-2.13-to-refresh-old.configure.patch \ - file://0005-fix-do_compile-failed-on-mips.patch \ - file://disable-mozglue-in-stand-alone-builds.patch \ - file://add-riscv-support.patch \ - file://0001-mozjs-fix-coredump-caused-by-getenv.patch \ - file://JS_PUBLIC_API.patch \ - " -SRC_URI_append_libc-musl = " \ - file://0006-support-musl.patch \ - " -SRC_URI_append_mipsarchn32 = " \ - file://0001-fix-compiling-failure-on-mips64-n32-bsp.patch \ - " - -SRC_URI[md5sum] = "c9473c625ee0a9edaaac8b742ff24c5f" -SRC_URI[sha256sum] = "f9324a6724233ab15f10381fe13e635e89d725ef1e78025a0a7d36c58a84a0f9" - -inherit autotools pkgconfig perlnative pythonnative - -inherit distro_features_check -CONFLICT_DISTRO_FEATURES_mipsarchn32 = "ld-is-gold" - -DEPENDS += "nspr zlib" - -# Disable null pointer optimization in gcc >= 6 -# https://bugzilla.redhat.com/show_bug.cgi?id=1328045 -CFLAGS += "-fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks" -CXXFLAGS += "-fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks" - -# nspr's package-config is ignored so set libs manually -EXTRA_OECONF = " \ - --target=${TARGET_SYS} \ - --host=${BUILD_SYS} \ - --prefix=${prefix} \ - --libdir=${libdir} \ - --disable-tests \ - --with-nspr-libs='-lplds4 -lplc4 -lnspr4' \ - ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \ -" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" -PACKAGECONFIG[x11] = "--x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--x-includes=no --x-libraries=no,virtual/libx11" - -EXTRA_OEMAKE_task-compile += "OS_LDFLAGS='-Wl,-latomic ${LDFLAGS}'" -EXTRA_OEMAKE_task-install += "STATIC_LIBRARY_NAME=js_static" - -do_configure() { - export SHELL="/bin/sh" - export TMP="${B}" - ${S}/js/src/configure ${EXTRA_OECONF} -} - -do_compile_prepend() { - export SHELL="/bin/sh" - export S - export PYTHONPATH - cd ${S} - for sub_dir in python testing/mozbase; do - for module_dir in `ls $sub_dir -1`;do - [ $module_dir = "virtualenv" ] && continue - if [ -d "${S}/$sub_dir/$module_dir" ];then - PYTHONPATH="$PYTHONPATH:${S}/$sub_dir/$module_dir" - fi - done - done - PYTHONPATH="$PYTHONPATH:${S}/config:${S}/build" - cd - -} - -do_install_prepend() { - export SHELL="/bin/sh" - export S - export PYTHONPATH - cd ${S} - for sub_dir in python testing/mozbase; do - for module_dir in `ls $sub_dir -1`;do - [ $module_dir = "virtualenv" ] && continue - if [ -d "${S}/$sub_dir/$module_dir" ];then - PYTHONPATH="$PYTHONPATH:${S}/$sub_dir/$module_dir" - fi - done - done - PYTHONPATH="$PYTHONPATH:${S}/config:${S}/build" - cd - -} - -PACKAGES =+ "lib${BPN}" -FILES_lib${BPN} += "${libdir}/lib*.so" -FILES_${PN}-dev += "${bindir}/js52-config" - -# Fails to build with thumb-1 (qemuarm) -#| {standard input}: Assembler messages: -#| {standard input}:2172: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r2,r1,LSR#20' -#| {standard input}:2173: Error: unshifted register required -- `bic r2,r2,#(1<<11)' -#| {standard input}:2174: Error: unshifted register required -- `orr r1,r1,#(1<<20)' -#| {standard input}:2176: Error: instruction not supported in Thumb16 mode -- `subs r2,r2,#0x300' -#| {standard input}:2178: Error: instruction not supported in Thumb16 mode -- `subs r5,r2,#52' -ARM_INSTRUCTION_SET_armv5 = "arm" -ARM_INSTRUCTION_SET_armv4 = "arm" - -DISABLE_STATIC = "" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mraa/mraa/0001-cmake-Use-a-regular-expression-to-match-x86-architec.patch b/external/meta-openembedded/meta-oe/recipes-extended/mraa/mraa/0001-cmake-Use-a-regular-expression-to-match-x86-architec.patch new file mode 100644 index 00000000..0cae02f0 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/mraa/mraa/0001-cmake-Use-a-regular-expression-to-match-x86-architec.patch @@ -0,0 +1,35 @@ +From 5de183dc436bb647361ab641d891c113e6a7dadd Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 8 Mar 2020 16:30:48 -0700 +Subject: [PATCH] cmake: Use a regular expression to match x86 architectures + +in OE we use i686 for qemux86 and this results in + +-- INFO - Target arch is i686 +CMake Error at CMakeLists.txt:191 (message): + Only x86, arm, mips, PERIPHERALMAN and mock platforms currently supported + +So using a wildcard helps in using any x86 arch + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + CMakeLists.txt | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 250d9106..fb642722 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -176,8 +176,7 @@ else () + message (STATUS "INFO - Override arch is ${DETECTED_ARCH}") + endif() + +-if (DETECTED_ARCH STREQUAL "i586" OR DETECTED_ARCH STREQUAL "x86_64" +- OR DETECTED_ARCH STREQUAL "i386") ++if (DETECTED_ARCH MATCHES "i?86" OR DETECTED_ARCH STREQUAL "x86_64") + set (X86PLAT ON) + elseif (DETECTED_ARCH MATCHES "arm.*" OR DETECTED_ARCH MATCHES "aarch64") + set (ARMPLAT ON) +-- +2.25.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/mraa/mraa_git.bb b/external/meta-openembedded/meta-oe/recipes-extended/mraa/mraa_git.bb index 737c1342..403d641e 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/mraa/mraa_git.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/mraa/mraa_git.bb @@ -3,12 +3,13 @@ HOMEPAGE = "https://github.com/intel-iot-devkit/mraa" SECTION = "libs" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=4b92a3b497d7943042a6db40c088c3f2" +LIC_FILES_CHKSUM = "file://COPYING;md5=91e7de50a8d3cf01057f318d72460acd" -SRCREV = "fbb7d9232067eac3f4508a37a8f7ea0c4fcebacb" -PV = "1.9.0-git${SRCPV}" +SRCREV = "e15ce6fbc76148ba8835adc92196b0d0a3f245e7" +PV = "2.1.0+git${SRCPV}" -SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http \ +SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=http \ + file://0001-cmake-Use-a-regular-expression-to-match-x86-architec.patch \ " S = "${WORKDIR}/git" @@ -22,8 +23,12 @@ DEPENDS += "json-c" EXTRA_OECMAKE_append = " -DINSTALLTOOLS:BOOL=ON -DFIRMATA=ON -DCMAKE_SKIP_RPATH=ON \ -DPYTHON3_PACKAGES_PATH:PATH=${baselib}/python${PYTHON_BASEVERSION}/site-packages \ + -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so \ + -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \ " +CFLAGS += "-fcommon" + # Prepend mraa-utils to make sure bindir ends up in there PACKAGES =+ "${PN}-utils" @@ -58,3 +63,5 @@ RDEPENDS_node-${PN} += "nodejs" ### Include desired language bindings ### PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}" PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}" + +TOOLCHAIN = "gcc" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/nana/nana_2.5.bb b/external/meta-openembedded/meta-oe/recipes-extended/nana/nana_2.5.bb index 19a90ff0..42350069 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/nana/nana_2.5.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/nana/nana_2.5.bb @@ -4,7 +4,7 @@ checking (as in assert.h) and logging (printf style debugging) in \ GNU C and C++." SECTION = "Development/Languages/C and C++" -SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${BP}.tar.gz \ +SRC_URI = "http://download.savannah.gnu.org/releases/${BPN}/${BP}.tar.gz \ file://change-mandir-to-DESTDIR.patch \ file://modify-acinclude.m4-and-configure.in.patch \ " @@ -15,7 +15,7 @@ LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=16aa57f3b7fdda870cee597275bd5d11" -inherit autotools-brokensep pkgconfig +inherit autotools-brokensep pkgconfig texinfo EXTRA_OEMAKE = "DESTDIR=${D}" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/openlmi/openlmi-tools_0.10.5.bb b/external/meta-openembedded/meta-oe/recipes-extended/openlmi/openlmi-tools_0.10.5.bb index 419b3ee6..04f82d2b 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/openlmi/openlmi-tools_0.10.5.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/openlmi/openlmi-tools_0.10.5.bb @@ -5,7 +5,7 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://../COPYING;md5=75859989545e37968a99b631ef42722e" SECTION = "System/Management" -inherit setuptools +inherit ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "setuptools", "", d)} DEPENDS = "python-native python-pywbem-native python-m2crypto python-pywbem" @@ -17,10 +17,10 @@ SRC_URI[sha256sum] = "292b8f5f2250655a4add8183c529b73358bc980bd4f23cfa484a940953 S = "${WORKDIR}/${BP}/cli" do_configure_prepend() { - sed 's/@@VERSION@@/$(VERSION)/g' setup.py.skel >setup.py + sed 's/@@VERSION@@/$(VERSION)/g' ${S}/setup.py.skel > ${S}/setup.py } python() { - if 'meta-python' not in d.getVar('BBFILE_COLLECTIONS').split(): - raise bb.parse.SkipRecipe('Requires meta-python to be present.') + if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split(): + raise bb.parse.SkipRecipe('Requires meta-python2 to be present.') } diff --git a/external/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman/0001-Port-to-OpenSSL-1.1.0.patch b/external/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman/0001-Port-to-OpenSSL-1.1.0.patch deleted file mode 100644 index 49afa56f..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman/0001-Port-to-OpenSSL-1.1.0.patch +++ /dev/null @@ -1,162 +0,0 @@ -From f78643d2388dd0697f83f17880403253a0596d83 Mon Sep 17 00:00:00 2001 -From: Vitezslav Crhonek <vcrhonek@redhat.com> -Date: Wed, 5 Sep 2018 11:23:46 -0700 -Subject: [PATCH 1/2] Port to OpenSSL 1.1.0 - -Upstream-Status: Submitted [https://github.com/Openwsman/openwsman/pull/99] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/lib/wsman-curl-client-transport.c | 6 +++- - src/server/shttpd/io_ssl.c | 17 ---------- - src/server/shttpd/shttpd.c | 20 ++++-------- - src/server/shttpd/ssl.h | 46 --------------------------- - 4 files changed, 12 insertions(+), 77 deletions(-) - -diff --git a/src/lib/wsman-curl-client-transport.c b/src/lib/wsman-curl-client-transport.c -index cd7f517a..e64ad097 100644 ---- a/src/lib/wsman-curl-client-transport.c -+++ b/src/lib/wsman-curl-client-transport.c -@@ -241,12 +241,16 @@ write_handler( void *ptr, size_t size, size_t nmemb, void *data) - static int ssl_certificate_thumbprint_verify_callback(X509_STORE_CTX *ctx, void *arg) - { - unsigned char *thumbprint = (unsigned char *)arg; -- X509 *cert = ctx->cert; - EVP_MD *tempDigest; - - unsigned char tempFingerprint[EVP_MAX_MD_SIZE]; - unsigned int tempFingerprintLen; - tempDigest = (EVP_MD*)EVP_sha1( ); -+ -+ X509 *cert = X509_STORE_CTX_get_current_cert(ctx); -+ if(!cert) -+ return 0; -+ - if ( X509_digest(cert, tempDigest, tempFingerprint, &tempFingerprintLen ) <= 0) - return 0; - if(!memcmp(tempFingerprint, thumbprint, tempFingerprintLen)) -diff --git a/src/server/shttpd/io_ssl.c b/src/server/shttpd/io_ssl.c -index 6de0db2a..7ac669e4 100644 ---- a/src/server/shttpd/io_ssl.c -+++ b/src/server/shttpd/io_ssl.c -@@ -11,23 +11,6 @@ - #include "defs.h" - - #if !defined(NO_SSL) --struct ssl_func ssl_sw[] = { -- {"SSL_free", {0}}, -- {"SSL_accept", {0}}, -- {"SSL_connect", {0}}, -- {"SSL_read", {0}}, -- {"SSL_write", {0}}, -- {"SSL_get_error", {0}}, -- {"SSL_set_fd", {0}}, -- {"SSL_new", {0}}, -- {"SSL_CTX_new", {0}}, -- {"SSLv23_server_method", {0}}, -- {"SSL_library_init", {0}}, -- {"SSL_CTX_use_PrivateKey_file", {0}}, -- {"SSL_CTX_use_certificate_file",{0}}, -- {NULL, {0}} --}; -- - void - _shttpd_ssl_handshake(struct stream *stream) - { -diff --git a/src/server/shttpd/shttpd.c b/src/server/shttpd/shttpd.c -index 5876392e..4c1dbf32 100644 ---- a/src/server/shttpd/shttpd.c -+++ b/src/server/shttpd/shttpd.c -@@ -1476,20 +1476,14 @@ set_ssl(struct shttpd_ctx *ctx, const char *pem) - int retval = FALSE; - EC_KEY* key; - -- /* Load SSL library dynamically */ -- if ((lib = dlopen(SSL_LIB, RTLD_LAZY)) == NULL) { -- _shttpd_elog(E_LOG, NULL, "set_ssl: cannot load %s", SSL_LIB); -- return (FALSE); -- } -- -- for (fp = ssl_sw; fp->name != NULL; fp++) -- if ((fp->ptr.v_void = dlsym(lib, fp->name)) == NULL) { -- _shttpd_elog(E_LOG, NULL,"set_ssl: cannot find %s", fp->name); -- return (FALSE); -- } -- - /* Initialize SSL crap */ -+ debug("Initialize SSL"); -+ SSL_load_error_strings(); -+ #if OPENSSL_VERSION_NUMBER < 0x10100000L - SSL_library_init(); -+ #else -+ OPENSSL_init_ssl(0, NULL); -+ #endif - - if ((CTX = SSL_CTX_new(SSLv23_server_method())) == NULL) - _shttpd_elog(E_LOG, NULL, "SSL_CTX_new error"); -@@ -1532,7 +1526,7 @@ set_ssl(struct shttpd_ctx *ctx, const char *pem) - if (strncasecmp(protocols[idx].name, ssl_disabled_protocols, blank_ptr-ssl_disabled_protocols) == 0) { - //_shttpd_elog(E_LOG, NULL, "SSL: disable %s protocol", protocols[idx].name); - debug("SSL: disable %s protocol", protocols[idx].name); -- SSL_CTX_ctrl(CTX, SSL_CTRL_OPTIONS, protocols[idx].opt, NULL); -+ SSL_CTX_set_options(CTX, protocols[idx].opt); - break; - } - } -diff --git a/src/server/shttpd/ssl.h b/src/server/shttpd/ssl.h -index a863f2c7..8dad0109 100644 ---- a/src/server/shttpd/ssl.h -+++ b/src/server/shttpd/ssl.h -@@ -12,50 +12,4 @@ - - #include <openssl/ssl.h> - --#else -- --/* -- * Snatched from OpenSSL includes. I put the prototypes here to be independent -- * from the OpenSSL source installation. Having this, shttpd + SSL can be -- * built on any system with binary SSL libraries installed. -- */ -- --typedef struct ssl_st SSL; --typedef struct ssl_method_st SSL_METHOD; --typedef struct ssl_ctx_st SSL_CTX; -- --#define SSL_ERROR_WANT_READ 2 --#define SSL_ERROR_WANT_WRITE 3 --#define SSL_ERROR_SYSCALL 5 --#define SSL_FILETYPE_PEM 1 -- - #endif -- --/* -- * Dynamically loaded SSL functionality -- */ --struct ssl_func { -- const char *name; /* SSL function name */ -- union variant ptr; /* Function pointer */ --}; -- --extern struct ssl_func ssl_sw[]; -- --#define FUNC(x) ssl_sw[x].ptr.v_func -- --#define SSL_free(x) (* (void (*)(SSL *)) FUNC(0))(x) --#define SSL_accept(x) (* (int (*)(SSL *)) FUNC(1))(x) --#define SSL_connect(x) (* (int (*)(SSL *)) FUNC(2))(x) --#define SSL_read(x,y,z) (* (int (*)(SSL *, void *, int)) FUNC(3))((x),(y),(z)) --#define SSL_write(x,y,z) \ -- (* (int (*)(SSL *, const void *,int)) FUNC(4))((x), (y), (z)) --#define SSL_get_error(x,y)(* (int (*)(SSL *, int)) FUNC(5))((x), (y)) --#define SSL_set_fd(x,y) (* (int (*)(SSL *, int)) FUNC(6))((x), (y)) --#define SSL_new(x) (* (SSL * (*)(SSL_CTX *)) FUNC(7))(x) --#define SSL_CTX_new(x) (* (SSL_CTX * (*)(SSL_METHOD *)) FUNC(8))(x) --#define SSLv23_server_method() (* (SSL_METHOD * (*)(void)) FUNC(9))() --#define SSL_library_init() (* (int (*)(void)) FUNC(10))() --#define SSL_CTX_use_PrivateKey_file(x,y,z) (* (int (*)(SSL_CTX *, \ -- const char *, int)) FUNC(11))((x), (y), (z)) --#define SSL_CTX_use_certificate_file(x,y,z) (* (int (*)(SSL_CTX *, \ -- const char *, int)) FUNC(12))((x), (y), (z)) --- -2.18.0 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman/0002-Check-OpenSSL-version-number-to-allow-builds-with-ol.patch b/external/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman/0002-Check-OpenSSL-version-number-to-allow-builds-with-ol.patch deleted file mode 100644 index 5ae2e000..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman/0002-Check-OpenSSL-version-number-to-allow-builds-with-ol.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 75669b077bd54bedbc086c60cbe137e7f4c685b5 Mon Sep 17 00:00:00 2001 -From: Vitezslav Crhonek <vcrhonek@redhat.com> -Date: Mon, 24 Apr 2017 11:28:39 +0200 -Subject: [PATCH 2/2] Check OpenSSL version number to allow builds with older - version - -Upstream-Status: Submitted [https://github.com/Openwsman/openwsman/pull/99] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/lib/wsman-curl-client-transport.c | 4 ++++ - src/server/shttpd/shttpd.c | 4 ++++ - 2 files changed, 8 insertions(+) - -diff --git a/src/lib/wsman-curl-client-transport.c b/src/lib/wsman-curl-client-transport.c -index e64ad097..4fc047e8 100644 ---- a/src/lib/wsman-curl-client-transport.c -+++ b/src/lib/wsman-curl-client-transport.c -@@ -247,7 +247,11 @@ static int ssl_certificate_thumbprint_verify_callback(X509_STORE_CTX *ctx, void - unsigned int tempFingerprintLen; - tempDigest = (EVP_MD*)EVP_sha1( ); - -+ #if OPENSSL_VERSION_NUMBER < 0x10100000L -+ X509 *cert = ctx->cert; -+ #else - X509 *cert = X509_STORE_CTX_get_current_cert(ctx); -+ #endif - if(!cert) - return 0; - -diff --git a/src/server/shttpd/shttpd.c b/src/server/shttpd/shttpd.c -index 4c1dbf32..161720c8 100644 ---- a/src/server/shttpd/shttpd.c -+++ b/src/server/shttpd/shttpd.c -@@ -1526,7 +1526,11 @@ set_ssl(struct shttpd_ctx *ctx, const char *pem) - if (strncasecmp(protocols[idx].name, ssl_disabled_protocols, blank_ptr-ssl_disabled_protocols) == 0) { - //_shttpd_elog(E_LOG, NULL, "SSL: disable %s protocol", protocols[idx].name); - debug("SSL: disable %s protocol", protocols[idx].name); -+ #if OPENSSL_VERSION_NUMBER < 0x10100000L -+ SSL_CTX_ctrl(CTX, SSL_CTRL_OPTIONS, protocols[idx].opt, NULL); -+ #else - SSL_CTX_set_options(CTX, protocols[idx].opt); -+ #endif - break; - } - } --- -2.18.0 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman_2.6.5.bb b/external/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman_2.6.11.bb index 5fba3855..9d5a2307 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman_2.6.5.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/openwsman/openwsman_2.6.11.bb @@ -12,26 +12,23 @@ SECTION = "Applications/System" DEPENDS = "curl libxml2 openssl libpam" -inherit distro_features_check +inherit features_check REQUIRED_DISTRO_FEATURES = "pam" -SRCREV = "e90e5c96e3006c372bf45e0185e33c9250e67df6" -PV = "2.6.5" +SRCREV = "d8eba6cb6682b59d84ca1da67a523520b879ade6" SRC_URI = "git://github.com/Openwsman/openwsman.git \ file://libssl-is-required-if-eventint-supported.patch \ file://openwsmand.service \ file://0001-lock.c-Define-PTHREAD_MUTEX_RECURSIVE_NP-if-undefine.patch \ - file://0001-Port-to-OpenSSL-1.1.0.patch \ - file://0002-Check-OpenSSL-version-number-to-allow-builds-with-ol.patch \ " S = "${WORKDIR}/git" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=d4f53d4c6cf73b9d43186ce3be6dd0ba" -inherit systemd cmake pkgconfig pythonnative perlnative +inherit systemd cmake pkgconfig python3native perlnative SYSTEMD_SERVICE_${PN} = "openwsmand.service" SYSTEMD_AUTO_ENABLE = "disable" @@ -41,6 +38,8 @@ LDFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', " -fuse- EXTRA_OECMAKE = "-DBUILD_BINDINGS=NO \ -DBUILD_LIBCIM=NO \ -DBUILD_PERL=YES \ + -DBUILD_PYTHON3=YES \ + -DBUILD_PYTHON=NO \ -DCMAKE_INSTALL_PREFIX=${prefix} \ -DLIB=${baselib} \ " diff --git a/external/meta-openembedded/meta-oe/recipes-extended/ostree/ostree/run-ptest b/external/meta-openembedded/meta-oe/recipes-extended/ostree/ostree/run-ptest new file mode 100644 index 00000000..963d1f69 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/ostree/ostree/run-ptest @@ -0,0 +1,3 @@ +#! /bin/sh + +gnome-desktop-testing-runner libostree diff --git a/external/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2020.3.bb b/external/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2020.3.bb new file mode 100644 index 00000000..43021c53 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2020.3.bb @@ -0,0 +1,189 @@ +SUMMARY = "Versioned Operating System Repository." +DESCRIPTION = "libostree is both a shared library and suite of command line \ +tools that combines a \"git-like\" model for committing and downloading \ +bootable filesystem trees, along with a layer for deploying them and managing \ +the bootloader configuration." +HOMEPAGE = "https://ostree.readthedocs.io" +LICENSE = "LGPLv2.1" + +LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" + +DEPENDS = " \ + glib-2.0 \ + e2fsprogs \ + libcap \ + zlib \ + xz \ + bison-native \ +" + +# The Yocto mirror has an old export of ostree: +# http://downloads.yoctoproject.org/mirror/sources/git2_github.com.ostreedev.ostree.tar.gz +PREMIRRORS = "" + +SRC_URI = " \ + gitsm://github.com/ostreedev/ostree \ + file://run-ptest \ +" +SRCREV = "6ed48234ba579ff73eb128af237212b0a00f2057" + +UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+)" + +S = "${WORKDIR}/git" + +inherit autotools bash-completion gobject-introspection gtk-doc manpages pkgconfig ptest-gnome systemd + +# Package configuration - match ostree defaults, but without rofiles-fuse +# otherwise we introduce a dependendency on meta-filesystems +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd libmount', '', d)} \ + glib \ + gpgme \ + soup \ +" + +# We include soup because ostree can't (currently) be built without +# soup or curl - https://github.com/ostreedev/ostree/issues/1897 +PACKAGECONFIG_class-native ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ + builtin-grub2-mkconfig \ + gpgme \ + soup \ +" + +PACKAGECONFIG[avahi] = "--with-avahi, --without-avahi, avahi" +PACKAGECONFIG[builtin-grub2-mkconfig] = "--with-builtin-grub2-mkconfig, --without-builtin-grub2-mkconfig" +PACKAGECONFIG[curl] = "--with-curl, --without-curl, curl" +PACKAGECONFIG[dracut] = "--with-dracut, --without-dracut" +PACKAGECONFIG[glib] = "--with-crypto=glib" +PACKAGECONFIG[gjs] = "ac_cv_path_GJS=${bindir}/gjs" +PACKAGECONFIG[gnutls] = "--with-crypto=gnutls, , gnutls" +PACKAGECONFIG[gpgme] = "--with-gpgme, --without-gpgme, gpgme" +PACKAGECONFIG[libarchive] = "--with-libarchive, --without-libarchive, libarchive" +PACKAGECONFIG[libmount] = "--with-libmount, --without-libmount, util-linux" +PACKAGECONFIG[manpages] = "--enable-man, --disable-man, libxslt-native docbook-xsl-stylesheets-native" +PACKAGECONFIG[mkinitcpio] = "--with-mkinitcpio, --without-mkinitcpio" +PACKAGECONFIG[no-http2] = "--disable-http2, --enable-http2" +PACKAGECONFIG[openssl] = "--with-crypto=openssl, , openssl" +PACKAGECONFIG[rofiles-fuse] = "--enable-rofiles-fuse, --disable-rofiles-fuse, fuse" +PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux" +PACKAGECONFIG[smack] = "--with-smack, --without-smack, smack" +PACKAGECONFIG[soup] = "--with-soup, --without-soup --disable-glibtest, libsoup-2.4" +PACKAGECONFIG[static] = "" +PACKAGECONFIG[systemd] = "--with-libsystemd --with-systemdsystemunitdir=${systemd_unitdir}/system, --without-libsystemd, systemd" +PACKAGECONFIG[trivial-httpd-cmdline] = "--enable-trivial-httpd-cmdline, --disable-trivial-httpd-cmdline" + +EXTRA_OECONF = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'static', '--with-static-compiler=\'${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}\'', '', d)} \ +" + +# Makefile-libostree.am overrides this to avoid a build problem with clang, +# but that fix breaks cross compilation and we don't need it +EXTRA_OEMAKE = " \ + INTROSPECTION_SCANNER_ENV= \ +" + +EXTRA_OECONF_class-native = " \ + --enable-wrpseudo-compat \ + --disable-otmpfile \ +" + +# Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the +# do_configure stage so we do depend on it +SYSROOT_DIR = "${STAGING_DIR_TARGET}" +SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" +do_configure[vardeps] += "SYSROOT_DIR" + +do_configure_prepend() { + # this reflects what autogen.sh does, but the OE wrappers for autoreconf + # allow it to work without the other gyrations which exist there + cp ${S}/libglnx/Makefile-libglnx.am ${S}/libglnx/Makefile-libglnx.am.inc + cp ${S}/bsdiff/Makefile-bsdiff.am ${S}/bsdiff/Makefile-bsdiff.am.inc +} + +do_install_append_class-native() { + create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" +} + +PACKAGE_BEFORE_PN = " \ + ${PN}-dracut \ + ${PN}-grub \ + ${PN}-mkinitcpio \ + ${PN}-switchroot \ + ${PN}-trivial-httpd \ +" + +FILES_${PN} += " \ + ${nonarch_libdir}/${BPN} \ + ${nonarch_libdir}/tmpfiles.d \ + ${systemd_unitdir}/system \ + ${systemd_unitdir}/system-generators \ +" +FILES_${PN}-dracut = " \ + ${sysconfdir}/dracut.conf.d \ + ${libdir}/dracut \ +" +FILES_${PN}-grub = " \ + ${sysconfdir}/grub.d \ + ${libexecdir}/libostree/grub2-15_ostree \ +" +FILES_${PN}-mkinitcpio = " \ + ${sysconfdir}/ostree-mkinitcpio.conf \ + ${libdir}/initcpio \ +" +FILES_${PN}-switchroot = " \ + ${nonarch_libdir}/${BPN}/ostree-prepare-root \ + ${systemd_unitdir}/system/ostree-prepare-root.service \ +" +FILES_${PN}-trivial-httpd = " \ + ${libexecdir}/libostree/ostree-trivial-httpd \ +" + +RDEPENDS_${PN} = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'trivial-httpd-cmdline', '${PN}-trivial-httpd', '', d)} \ +" +RDEPENDS_${PN}-dracut = "bash" +RDEPENDS_${PN}-mkinitcpio = "bash" +RDEPENDS_${PN}_class-target = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'gpgme', 'gnupg', '', d)} \ + ${PN}-switchroot \ +" + +# +# Note that to get ptest to pass you also need: +# +# xattr in DISTRO_FEATURES +# static ostree-prepare-root (PACKAGECONFIG_append_pn-ostree = " static") +# meta-python in your layers +# overlayfs in your kernel (KERNEL_EXTRA_FEATURES += "features/overlayfs/overlayfs.scc") +# busybox built statically +# /var/tmp as a real filesystem (not a tmpfs) +# Sufficient disk space (IMAGE_ROOTFS_SIZE = "524288") and RAM (QB_MEM = "-m 1024") +# +RDEPENDS_${PN}-ptest += " \ + attr \ + bash \ + coreutils \ + cpio \ + diffutils \ + findutils \ + grep \ + python3-core \ + python3-multiprocessing \ + strace \ + tar \ + util-linux \ + xz \ + ${PN}-trivial-httpd \ + ${@bb.utils.contains('BBFILE_COLLECTIONS', 'meta-python', 'python3-pyyaml', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'gjs', 'gjs', '', d)} \ +" +RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils glibc-localedata-en-us" + +RRECOMMENDS_${PN} += "kernel-module-overlay" + +SYSTEMD_SERVICE_${PN} = "ostree-remount.service ostree-finalize-staged.path" +SYSTEMD_SERVICE_${PN}-switchroot = "ostree-prepare-root.service" + +BBCLASSEXTEND = "native" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-plugin-ccreds_11.bb b/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-plugin-ccreds_11.bb index 95d879dc..9838e75e 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-plugin-ccreds_11.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-plugin-ccreds_11.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" DEPENDS = "libpam openssl db" -inherit distro_features_check +inherit features_check REQUIRED_DISTRO_FEATURES = "pam" SRCREV = "e2145df09469bf84878e4729b4ecd814efb797d1" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-plugin-ldapdb/0001-include-stdexcept-for-std-invalid_argument.patch b/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-plugin-ldapdb/0001-include-stdexcept-for-std-invalid_argument.patch new file mode 100644 index 00000000..0a934115 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-plugin-ldapdb/0001-include-stdexcept-for-std-invalid_argument.patch @@ -0,0 +1,25 @@ +From 3e97c9004f4ec58ca3696ee6298f91e6eeb76e04 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 23 Dec 2019 14:46:25 -0800 +Subject: [PATCH] include <stdexcept> for std::invalid_argument + +Upstream-Status: Submitted [https://github.com/rmbreak/pam_ldapdb/pull/11] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + pam_ldapdb.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/pam_ldapdb.cpp b/pam_ldapdb.cpp +index 9baf1e6..be5d85c 100644 +--- a/pam_ldapdb.cpp ++++ b/pam_ldapdb.cpp +@@ -1,5 +1,6 @@ + #include <map> + #include <string> ++#include <stdexcept> + #include <utility> + #include <syslog.h> + #include <pwd.h> +-- +2.24.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb b/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb index c59a259f..626b22fe 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb @@ -7,14 +7,15 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=41ab94182d94be9bb35e2a8b933f1e7d" DEPENDS = "libpam openldap" -inherit distro_features_check +inherit features_check REQUIRED_DISTRO_FEATURES = "pam" -SRC_URI = "https://github.com/rmbreak/pam_ldapdb/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz" -SRC_URI[md5sum] = "2dd4f1370fcfe995ee0ad09611109b87" -SRC_URI[sha256sum] = "8ed92b36523556bb5d9bf3eb33a1035e46041d4be767c8d62136930c0ca0e45b" +SRCREV = "84d7b260f1ae6857ae36e014c9a5968e8aa1cbe8" +SRC_URI = "git://github.com/rmbreak/pam_ldapdb \ + file://0001-include-stdexcept-for-std-invalid_argument.patch \ +" -S = "${WORKDIR}/pam_ldapdb-${PV}" +S = "${WORKDIR}/git" do_install () { oe_runmake install DESTDIR=${D} PAMDIR=${base_libdir}/security diff --git a/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth/0001-Adapt-to-OpenSSL-1.1.1.patch b/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth/0001-Adapt-to-OpenSSL-1.1.1.patch new file mode 100644 index 00000000..2d75a18f --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth/0001-Adapt-to-OpenSSL-1.1.1.patch @@ -0,0 +1,879 @@ +From 37e233307a79a9250962dcf77b7c7e27a02a1a35 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 1 Feb 2019 22:44:10 -0800 +Subject: [PATCH] Adapt to OpenSSL 1.1.1 + +From: Guido Falsi <mad@madpilot.net> +https://sources.debian.org/src/pam-ssh-agent-auth/0.10.3-3/debian/patches/openssl-1.1.1-1.patch/ + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + authfd.c | 50 ++++++++++++++++++++ + bufbn.c | 4 ++ + cipher.h | 6 ++- + kex.h | 9 +++- + key.c | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++-- + ssh-dss.c | 51 ++++++++++++++++---- + ssh-ecdsa.c | 40 ++++++++++++---- + ssh-rsa.c | 22 +++++++-- + 8 files changed, 287 insertions(+), 28 deletions(-) + +diff --git a/authfd.c b/authfd.c +index 212e06b..f91514d 100644 +--- a/authfd.c ++++ b/authfd.c +@@ -367,6 +367,7 @@ ssh_get_next_identity(AuthenticationConnection *auth, char **comment, int versio + case 1: + key = pamsshagentauth_key_new(KEY_RSA1); + bits = pamsshagentauth_buffer_get_int(&auth->identities); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + pamsshagentauth_buffer_get_bignum(&auth->identities, key->rsa->e); + pamsshagentauth_buffer_get_bignum(&auth->identities, key->rsa->n); + *comment = pamsshagentauth_buffer_get_string(&auth->identities, NULL); +@@ -374,6 +375,15 @@ ssh_get_next_identity(AuthenticationConnection *auth, char **comment, int versio + if (keybits < 0 || bits != (u_int)keybits) + pamsshagentauth_logit("Warning: identity keysize mismatch: actual %d, announced %u", + BN_num_bits(key->rsa->n), bits); ++#else ++ pamsshagentauth_buffer_get_bignum(&auth->identities, RSA_get0_e(key->rsa)); ++ pamsshagentauth_buffer_get_bignum(&auth->identities, RSA_get0_n(key->rsa)); ++ *comment = pamsshagentauth_buffer_get_string(&auth->identities, NULL); ++ keybits = BN_num_bits(RSA_get0_n(key->rsa)); ++ if (keybits < 0 || bits != (u_int)keybits) ++ pamsshagentauth_logit("Warning: identity keysize mismatch: actual %d, announced %u", ++ BN_num_bits(RSA_get0_n(key->rsa)), bits); ++#endif + break; + case 2: + blob = pamsshagentauth_buffer_get_string(&auth->identities, &blen); +@@ -417,9 +427,15 @@ ssh_decrypt_challenge(AuthenticationConnection *auth, + } + pamsshagentauth_buffer_init(&buffer); + pamsshagentauth_buffer_put_char(&buffer, SSH_AGENTC_RSA_CHALLENGE); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + pamsshagentauth_buffer_put_int(&buffer, BN_num_bits(key->rsa->n)); + pamsshagentauth_buffer_put_bignum(&buffer, key->rsa->e); + pamsshagentauth_buffer_put_bignum(&buffer, key->rsa->n); ++#else ++ pamsshagentauth_buffer_put_int(&buffer, BN_num_bits(RSA_get0_n(key->rsa))); ++ pamsshagentauth_buffer_put_bignum(&buffer, RSA_get0_e(key->rsa)); ++ pamsshagentauth_buffer_put_bignum(&buffer, RSA_get0_n(key->rsa)); ++#endif + pamsshagentauth_buffer_put_bignum(&buffer, challenge); + pamsshagentauth_buffer_append(&buffer, session_id, 16); + pamsshagentauth_buffer_put_int(&buffer, response_type); +@@ -496,6 +512,7 @@ ssh_agent_sign(AuthenticationConnection *auth, + static void + ssh_encode_identity_rsa1(Buffer *b, RSA *key, const char *comment) + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + pamsshagentauth_buffer_put_int(b, BN_num_bits(key->n)); + pamsshagentauth_buffer_put_bignum(b, key->n); + pamsshagentauth_buffer_put_bignum(b, key->e); +@@ -504,6 +521,16 @@ ssh_encode_identity_rsa1(Buffer *b, RSA *key, const char *comment) + pamsshagentauth_buffer_put_bignum(b, key->iqmp); /* ssh key->u */ + pamsshagentauth_buffer_put_bignum(b, key->q); /* ssh key->p, SSL key->q */ + pamsshagentauth_buffer_put_bignum(b, key->p); /* ssh key->q, SSL key->p */ ++#else ++ pamsshagentauth_buffer_put_int(b, BN_num_bits(RSA_get0_n(key))); ++ pamsshagentauth_buffer_put_bignum(b, RSA_get0_n(key)); ++ pamsshagentauth_buffer_put_bignum(b, RSA_get0_e(key)); ++ pamsshagentauth_buffer_put_bignum(b, RSA_get0_d(key)); ++ /* To keep within the protocol: p < q for ssh. in SSL p > q */ ++ pamsshagentauth_buffer_put_bignum(b, RSA_get0_iqmp(key)); /* ssh key->u */ ++ pamsshagentauth_buffer_put_bignum(b, RSA_get0_q(key)); /* ssh key->p, SSL key->q */ ++ pamsshagentauth_buffer_put_bignum(b, RSA_get0_p(key)); /* ssh key->q, SSL key->p */ ++#endif + pamsshagentauth_buffer_put_cstring(b, comment); + } + +@@ -513,19 +540,36 @@ ssh_encode_identity_ssh2(Buffer *b, Key *key, const char *comment) + pamsshagentauth_buffer_put_cstring(b, key_ssh_name(key)); + switch (key->type) { + case KEY_RSA: ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + pamsshagentauth_buffer_put_bignum2(b, key->rsa->n); + pamsshagentauth_buffer_put_bignum2(b, key->rsa->e); + pamsshagentauth_buffer_put_bignum2(b, key->rsa->d); + pamsshagentauth_buffer_put_bignum2(b, key->rsa->iqmp); + pamsshagentauth_buffer_put_bignum2(b, key->rsa->p); + pamsshagentauth_buffer_put_bignum2(b, key->rsa->q); ++#else ++ pamsshagentauth_buffer_put_bignum2(b, RSA_get0_n(key->rsa)); ++ pamsshagentauth_buffer_put_bignum2(b, RSA_get0_e(key->rsa)); ++ pamsshagentauth_buffer_put_bignum2(b, RSA_get0_d(key->rsa)); ++ pamsshagentauth_buffer_put_bignum2(b, RSA_get0_iqmp(key->rsa)); ++ pamsshagentauth_buffer_put_bignum2(b, RSA_get0_p(key->rsa)); ++ pamsshagentauth_buffer_put_bignum2(b, RSA_get0_q(key->rsa)); ++#endif + break; + case KEY_DSA: ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + pamsshagentauth_buffer_put_bignum2(b, key->dsa->p); + pamsshagentauth_buffer_put_bignum2(b, key->dsa->q); + pamsshagentauth_buffer_put_bignum2(b, key->dsa->g); + pamsshagentauth_buffer_put_bignum2(b, key->dsa->pub_key); + pamsshagentauth_buffer_put_bignum2(b, key->dsa->priv_key); ++#else ++ pamsshagentauth_buffer_put_bignum2(b, DSA_get0_p(key->dsa)); ++ pamsshagentauth_buffer_put_bignum2(b, DSA_get0_q(key->dsa)); ++ pamsshagentauth_buffer_put_bignum2(b, DSA_get0_g(key->dsa)); ++ pamsshagentauth_buffer_put_bignum2(b, DSA_get0_pub_key(key->dsa)); ++ pamsshagentauth_buffer_put_bignum2(b, DSA_get0_priv_key(key->dsa)); ++#endif + break; + } + pamsshagentauth_buffer_put_cstring(b, comment); +@@ -605,9 +649,15 @@ ssh_remove_identity(AuthenticationConnection *auth, Key *key) + + if (key->type == KEY_RSA1) { + pamsshagentauth_buffer_put_char(&msg, SSH_AGENTC_REMOVE_RSA_IDENTITY); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + pamsshagentauth_buffer_put_int(&msg, BN_num_bits(key->rsa->n)); + pamsshagentauth_buffer_put_bignum(&msg, key->rsa->e); + pamsshagentauth_buffer_put_bignum(&msg, key->rsa->n); ++#else ++ pamsshagentauth_buffer_put_int(&msg, BN_num_bits(RSA_get0_n(key->rsa))); ++ pamsshagentauth_buffer_put_bignum(&msg, RSA_get0_e(key->rsa)); ++ pamsshagentauth_buffer_put_bignum(&msg, RSA_get0_n(key->rsa)); ++#endif + } else if (key->type == KEY_DSA || key->type == KEY_RSA) { + pamsshagentauth_key_to_blob(key, &blob, &blen); + pamsshagentauth_buffer_put_char(&msg, SSH2_AGENTC_REMOVE_IDENTITY); +diff --git a/bufbn.c b/bufbn.c +index 6a49c73..4ecedc1 100644 +--- a/bufbn.c ++++ b/bufbn.c +@@ -151,7 +151,11 @@ pamsshagentauth_buffer_put_bignum2_ret(Buffer *buffer, const BIGNUM *value) + pamsshagentauth_buffer_put_int(buffer, 0); + return 0; + } ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if (value->neg) { ++#else ++ if (BN_is_negative(value)) { ++#endif + pamsshagentauth_logerror("buffer_put_bignum2_ret: negative numbers not supported"); + return (-1); + } +diff --git a/cipher.h b/cipher.h +index 49bbc16..64f59ca 100644 +--- a/cipher.h ++++ b/cipher.h +@@ -59,15 +59,18 @@ + #define CIPHER_DECRYPT 0 + + typedef struct Cipher Cipher; +-typedef struct CipherContext CipherContext; ++// typedef struct CipherContext CipherContext; + + struct Cipher; ++/* + struct CipherContext { + int plaintext; + EVP_CIPHER_CTX evp; + Cipher *cipher; + }; ++*/ + ++/* + u_int cipher_mask_ssh1(int); + Cipher *cipher_by_name(const char *); + Cipher *cipher_by_number(int); +@@ -88,4 +91,5 @@ void cipher_set_keyiv(CipherContext *, u_char *); + int cipher_get_keyiv_len(const CipherContext *); + int cipher_get_keycontext(const CipherContext *, u_char *); + void cipher_set_keycontext(CipherContext *, u_char *); ++*/ + #endif /* CIPHER_H */ +diff --git a/kex.h b/kex.h +index 8e29c90..81ca57d 100644 +--- a/kex.h ++++ b/kex.h +@@ -70,7 +70,7 @@ enum kex_exchange { + #define KEX_INIT_SENT 0x0001 + + typedef struct Kex Kex; +-typedef struct Mac Mac; ++// typedef struct Mac Mac; + typedef struct Comp Comp; + typedef struct Enc Enc; + typedef struct Newkeys Newkeys; +@@ -84,6 +84,7 @@ struct Enc { + u_char *key; + u_char *iv; + }; ++/* + struct Mac { + char *name; + int enabled; +@@ -95,11 +96,13 @@ struct Mac { + HMAC_CTX evp_ctx; + struct umac_ctx *umac_ctx; + }; ++*/ + struct Comp { + int type; + int enabled; + char *name; + }; ++/* + struct Newkeys { + Enc enc; + Mac mac; +@@ -126,7 +129,9 @@ struct Kex { + int (*host_key_index)(Key *); + void (*kex[KEX_MAX])(Kex *); + }; ++*/ + ++/* + Kex *kex_setup(char *[PROPOSAL_MAX]); + void kex_finish(Kex *); + +@@ -152,6 +157,8 @@ kexgex_hash(const EVP_MD *, char *, char *, char *, int, char *, + void + derive_ssh1_session_id(BIGNUM *, BIGNUM *, u_int8_t[8], u_int8_t[16]); + ++*/ ++ + #if defined(DEBUG_KEX) || defined(DEBUG_KEXDH) + void dump_digest(char *, u_char *, int); + #endif +diff --git a/key.c b/key.c +index 107a442..aedbbb5 100644 +--- a/key.c ++++ b/key.c +@@ -77,15 +77,21 @@ pamsshagentauth_key_new(int type) + case KEY_RSA: + if ((rsa = RSA_new()) == NULL) + pamsshagentauth_fatal("key_new: RSA_new failed"); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if ((rsa->n = BN_new()) == NULL) + pamsshagentauth_fatal("key_new: BN_new failed"); + if ((rsa->e = BN_new()) == NULL) + pamsshagentauth_fatal("key_new: BN_new failed"); ++#else ++ if (RSA_set0_key(rsa, BN_new(), BN_new(), NULL) != 1) ++ pamsshagentauth_fatal("key_new: RSA_set0_key failed"); ++#endif + k->rsa = rsa; + break; + case KEY_DSA: + if ((dsa = DSA_new()) == NULL) + pamsshagentauth_fatal("key_new: DSA_new failed"); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if ((dsa->p = BN_new()) == NULL) + pamsshagentauth_fatal("key_new: BN_new failed"); + if ((dsa->q = BN_new()) == NULL) +@@ -94,6 +100,12 @@ pamsshagentauth_key_new(int type) + pamsshagentauth_fatal("key_new: BN_new failed"); + if ((dsa->pub_key = BN_new()) == NULL) + pamsshagentauth_fatal("key_new: BN_new failed"); ++#else ++ if (DSA_set0_pqg(dsa, BN_new(), BN_new(), BN_new()) != 1) ++ pamsshagentauth_fatal("key_new: DSA_set0_pqg failed"); ++ if (DSA_set0_key(dsa, BN_new(), NULL) != 1) ++ pamsshagentauth_fatal("key_new: DSA_set0_key failed"); ++#endif + k->dsa = dsa; + break; + case KEY_ECDSA: +@@ -118,6 +130,7 @@ pamsshagentauth_key_new_private(int type) + switch (k->type) { + case KEY_RSA1: + case KEY_RSA: ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if ((k->rsa->d = BN_new()) == NULL) + pamsshagentauth_fatal("key_new_private: BN_new failed"); + if ((k->rsa->iqmp = BN_new()) == NULL) +@@ -130,14 +143,30 @@ pamsshagentauth_key_new_private(int type) + pamsshagentauth_fatal("key_new_private: BN_new failed"); + if ((k->rsa->dmp1 = BN_new()) == NULL) + pamsshagentauth_fatal("key_new_private: BN_new failed"); ++#else ++ if (RSA_set0_key(k->rsa, NULL, NULL, BN_new()) != 1) ++ pamsshagentauth_fatal("key_new: RSA_set0_key failed"); ++ if (RSA_set0_crt_params(k->rsa, BN_new(), BN_new(), BN_new()) != 1) ++ pamsshagentauth_fatal("key_new: RSA_set0_crt_params failed"); ++ if (RSA_set0_factors(k->rsa, BN_new(), BN_new()) != 1) ++ pamsshagentauth_fatal("key_new: RSA_set0_factors failed"); ++#endif + break; + case KEY_DSA: ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if ((k->dsa->priv_key = BN_new()) == NULL) + pamsshagentauth_fatal("key_new_private: BN_new failed"); ++#else ++ if (DSA_set0_key(k->dsa, NULL, BN_new()) != 1) ++ pamsshagentauth_fatal("key_new_private: DSA_set0_key failed"); ++#endif + break; + case KEY_ECDSA: ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if (EC_KEY_set_private_key(k->ecdsa, BN_new()) != 1) + pamsshagentauth_fatal("key_new_private: EC_KEY_set_private_key failed"); ++#else ++#endif + break; + case KEY_ED25519: + RAND_bytes(k->ed25519->sk, sizeof(k->ed25519->sk)); +@@ -195,14 +224,26 @@ pamsshagentauth_key_equal(const Key *a, const Key *b) + case KEY_RSA1: + case KEY_RSA: + return a->rsa != NULL && b->rsa != NULL && ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + BN_cmp(a->rsa->e, b->rsa->e) == 0 && + BN_cmp(a->rsa->n, b->rsa->n) == 0; ++#else ++ BN_cmp(RSA_get0_e(a->rsa), RSA_get0_e(b->rsa)) == 0 && ++ BN_cmp(RSA_get0_n(a->rsa), RSA_get0_n(b->rsa)) == 0; ++#endif + case KEY_DSA: + return a->dsa != NULL && b->dsa != NULL && ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + BN_cmp(a->dsa->p, b->dsa->p) == 0 && + BN_cmp(a->dsa->q, b->dsa->q) == 0 && + BN_cmp(a->dsa->g, b->dsa->g) == 0 && + BN_cmp(a->dsa->pub_key, b->dsa->pub_key) == 0; ++#else ++ BN_cmp(DSA_get0_p(a->dsa), DSA_get0_p(b->dsa)) == 0 && ++ BN_cmp(DSA_get0_q(a->dsa), DSA_get0_q(b->dsa)) == 0 && ++ BN_cmp(DSA_get0_g(a->dsa), DSA_get0_g(b->dsa)) == 0 && ++ BN_cmp(DSA_get0_pub_key(a->dsa), DSA_get0_pub_key(b->dsa)) == 0; ++#endif + case KEY_ECDSA: + return a->ecdsa != NULL && b->ecdsa != NULL && + EC_KEY_check_key(a->ecdsa) == 1 && +@@ -231,7 +272,7 @@ pamsshagentauth_key_fingerprint_raw(const Key *k, enum fp_type dgst_type, + u_int *dgst_raw_length) + { + const EVP_MD *md = NULL; +- EVP_MD_CTX ctx; ++ EVP_MD_CTX *ctx; + u_char *blob = NULL; + u_char *retval = NULL; + u_int len = 0; +@@ -252,12 +293,21 @@ pamsshagentauth_key_fingerprint_raw(const Key *k, enum fp_type dgst_type, + } + switch (k->type) { + case KEY_RSA1: ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + nlen = BN_num_bytes(k->rsa->n); + elen = BN_num_bytes(k->rsa->e); + len = nlen + elen; + blob = pamsshagentauth_xmalloc(len); + BN_bn2bin(k->rsa->n, blob); + BN_bn2bin(k->rsa->e, blob + nlen); ++#else ++ nlen = BN_num_bytes(RSA_get0_n(k->rsa)); ++ elen = BN_num_bytes(RSA_get0_e(k->rsa)); ++ len = nlen + elen; ++ blob = pamsshagentauth_xmalloc(len); ++ BN_bn2bin(RSA_get0_n(k->rsa), blob); ++ BN_bn2bin(RSA_get0_e(k->rsa), blob + nlen); ++#endif + break; + case KEY_DSA: + case KEY_ECDSA: +@@ -273,11 +323,14 @@ pamsshagentauth_key_fingerprint_raw(const Key *k, enum fp_type dgst_type, + } + if (blob != NULL) { + retval = pamsshagentauth_xmalloc(EVP_MAX_MD_SIZE); +- EVP_DigestInit(&ctx, md); +- EVP_DigestUpdate(&ctx, blob, len); +- EVP_DigestFinal(&ctx, retval, dgst_raw_length); ++ /* XXX Errors from EVP_* functions are not hadled */ ++ ctx = EVP_MD_CTX_create(); ++ EVP_DigestInit(ctx, md); ++ EVP_DigestUpdate(ctx, blob, len); ++ EVP_DigestFinal(ctx, retval, dgst_raw_length); + memset(blob, 0, len); + pamsshagentauth_xfree(blob); ++ EVP_MD_CTX_destroy(ctx); + } else { + pamsshagentauth_fatal("key_fingerprint_raw: blob is null"); + } +@@ -457,10 +510,17 @@ pamsshagentauth_key_read(Key *ret, char **cpp) + return -1; + *cpp = cp; + /* Get public exponent, public modulus. */ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if (!read_bignum(cpp, ret->rsa->e)) + return -1; + if (!read_bignum(cpp, ret->rsa->n)) + return -1; ++#else ++ if (!read_bignum(cpp, RSA_get0_e(ret->rsa))) ++ return -1; ++ if (!read_bignum(cpp, RSA_get0_n(ret->rsa))) ++ return -1; ++#endif + success = 1; + break; + case KEY_UNSPEC: +@@ -583,10 +643,17 @@ pamsshagentauth_key_write(const Key *key, FILE *f) + + if (key->type == KEY_RSA1 && key->rsa != NULL) { + /* size of modulus 'n' */ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + bits = BN_num_bits(key->rsa->n); + fprintf(f, "%u", bits); + if (write_bignum(f, key->rsa->e) && + write_bignum(f, key->rsa->n)) { ++#else ++ bits = BN_num_bits(RSA_get0_n(key->rsa)); ++ fprintf(f, "%u", bits); ++ if (write_bignum(f, RSA_get0_e(key->rsa)) && ++ write_bignum(f, RSA_get0_n(key->rsa))) { ++#endif + success = 1; + } else { + pamsshagentauth_logerror("key_write: failed for RSA key"); +@@ -675,10 +742,17 @@ pamsshagentauth_key_size(const Key *k) + { + switch (k->type) { + case KEY_RSA1: ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + case KEY_RSA: + return BN_num_bits(k->rsa->n); + case KEY_DSA: + return BN_num_bits(k->dsa->p); ++#else ++ case KEY_RSA: ++ return BN_num_bits(RSA_get0_n(k->rsa)); ++ case KEY_DSA: ++ return BN_num_bits(DSA_get0_p(k->dsa)); ++#endif + case KEY_ECDSA: + { + int nid = EC_GROUP_get_curve_name(EC_KEY_get0_group(k->ecdsa)); +@@ -769,17 +843,29 @@ pamsshagentauth_key_from_private(const Key *k) + switch (k->type) { + case KEY_DSA: + n = pamsshagentauth_key_new(k->type); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if ((BN_copy(n->dsa->p, k->dsa->p) == NULL) || + (BN_copy(n->dsa->q, k->dsa->q) == NULL) || + (BN_copy(n->dsa->g, k->dsa->g) == NULL) || + (BN_copy(n->dsa->pub_key, k->dsa->pub_key) == NULL)) ++#else ++ if ((BN_copy(DSA_get0_p(n->dsa), DSA_get0_p(k->dsa)) == NULL) || ++ (BN_copy(DSA_get0_q(n->dsa), DSA_get0_q(k->dsa)) == NULL) || ++ (BN_copy(DSA_get0_g(n->dsa), DSA_get0_g(k->dsa)) == NULL) || ++ (BN_copy(DSA_get0_pub_key(n->dsa), DSA_get0_pub_key(k->dsa)) == NULL)) ++#endif + pamsshagentauth_fatal("key_from_private: BN_copy failed"); + break; + case KEY_RSA: + case KEY_RSA1: + n = pamsshagentauth_key_new(k->type); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if ((BN_copy(n->rsa->n, k->rsa->n) == NULL) || + (BN_copy(n->rsa->e, k->rsa->e) == NULL)) ++#else ++ if ((BN_copy(RSA_get0_n(n->rsa), RSA_get0_n(k->rsa)) == NULL) || ++ (BN_copy(RSA_get0_e(n->rsa), RSA_get0_e(k->rsa)) == NULL)) ++#endif + pamsshagentauth_fatal("key_from_private: BN_copy failed"); + break; + case KEY_ECDSA: +@@ -881,8 +967,13 @@ pamsshagentauth_key_from_blob(const u_char *blob, u_int blen) + switch (type) { + case KEY_RSA: + key = pamsshagentauth_key_new(type); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if (pamsshagentauth_buffer_get_bignum2_ret(&b, key->rsa->e) == -1 || + pamsshagentauth_buffer_get_bignum2_ret(&b, key->rsa->n) == -1) { ++#else ++ if (pamsshagentauth_buffer_get_bignum2_ret(&b, RSA_get0_e(key->rsa)) == -1 || ++ pamsshagentauth_buffer_get_bignum2_ret(&b, RSA_get0_n(key->rsa)) == -1) { ++#endif + pamsshagentauth_logerror("key_from_blob: can't read rsa key"); + pamsshagentauth_key_free(key); + key = NULL; +@@ -894,10 +985,17 @@ pamsshagentauth_key_from_blob(const u_char *blob, u_int blen) + break; + case KEY_DSA: + key = pamsshagentauth_key_new(type); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if (pamsshagentauth_buffer_get_bignum2_ret(&b, key->dsa->p) == -1 || + pamsshagentauth_buffer_get_bignum2_ret(&b, key->dsa->q) == -1 || + pamsshagentauth_buffer_get_bignum2_ret(&b, key->dsa->g) == -1 || + pamsshagentauth_buffer_get_bignum2_ret(&b, key->dsa->pub_key) == -1) { ++#else ++ if (pamsshagentauth_buffer_get_bignum2_ret(&b, DSA_get0_p(key->dsa)) == -1 || ++ pamsshagentauth_buffer_get_bignum2_ret(&b, DSA_get0_q(key->dsa)) == -1 || ++ pamsshagentauth_buffer_get_bignum2_ret(&b, DSA_get0_g(key->dsa)) == -1 || ++ pamsshagentauth_buffer_get_bignum2_ret(&b, DSA_get0_pub_key(key->dsa)) == -1) { ++#endif + pamsshagentauth_logerror("key_from_blob: can't read dsa key"); + pamsshagentauth_key_free(key); + key = NULL; +@@ -1015,6 +1113,7 @@ pamsshagentauth_key_to_blob(const Key *key, u_char **blobp, u_int *lenp) + } + pamsshagentauth_buffer_init(&b); + switch (key->type) { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + case KEY_DSA: + pamsshagentauth_buffer_put_cstring(&b, key_ssh_name(key)); + pamsshagentauth_buffer_put_bignum2(&b, key->dsa->p); +@@ -1027,6 +1126,20 @@ pamsshagentauth_key_to_blob(const Key *key, u_char **blobp, u_int *lenp) + pamsshagentauth_buffer_put_bignum2(&b, key->rsa->e); + pamsshagentauth_buffer_put_bignum2(&b, key->rsa->n); + break; ++#else ++ case KEY_DSA: ++ pamsshagentauth_buffer_put_cstring(&b, key_ssh_name(key)); ++ pamsshagentauth_buffer_put_bignum2(&b, DSA_get0_p(key->dsa)); ++ pamsshagentauth_buffer_put_bignum2(&b, DSA_get0_q(key->dsa)); ++ pamsshagentauth_buffer_put_bignum2(&b, DSA_get0_g(key->dsa)); ++ pamsshagentauth_buffer_put_bignum2(&b, DSA_get0_pub_key(key->dsa)); ++ break; ++ case KEY_RSA: ++ pamsshagentauth_buffer_put_cstring(&b, key_ssh_name(key)); ++ pamsshagentauth_buffer_put_bignum2(&b, RSA_get0_e(key->rsa)); ++ pamsshagentauth_buffer_put_bignum2(&b, RSA_get0_n(key->rsa)); ++ break; ++#endif + case KEY_ECDSA: + { + size_t l = 0; +@@ -1138,14 +1251,20 @@ pamsshagentauth_key_demote(const Key *k) + case KEY_RSA: + if ((pk->rsa = RSA_new()) == NULL) + pamsshagentauth_fatal("key_demote: RSA_new failed"); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if ((pk->rsa->e = BN_dup(k->rsa->e)) == NULL) + pamsshagentauth_fatal("key_demote: BN_dup failed"); + if ((pk->rsa->n = BN_dup(k->rsa->n)) == NULL) + pamsshagentauth_fatal("key_demote: BN_dup failed"); ++#else ++ if (RSA_set0_key(pk->rsa, BN_dup(RSA_get0_n(k->rsa)), BN_dup(RSA_get0_e(k->rsa)), NULL) != 1) ++ pamsshagentauth_fatal("key_demote: RSA_set0_key failed"); ++#endif + break; + case KEY_DSA: + if ((pk->dsa = DSA_new()) == NULL) + pamsshagentauth_fatal("key_demote: DSA_new failed"); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if ((pk->dsa->p = BN_dup(k->dsa->p)) == NULL) + pamsshagentauth_fatal("key_demote: BN_dup failed"); + if ((pk->dsa->q = BN_dup(k->dsa->q)) == NULL) +@@ -1154,6 +1273,12 @@ pamsshagentauth_key_demote(const Key *k) + pamsshagentauth_fatal("key_demote: BN_dup failed"); + if ((pk->dsa->pub_key = BN_dup(k->dsa->pub_key)) == NULL) + pamsshagentauth_fatal("key_demote: BN_dup failed"); ++#else ++ if (DSA_set0_pqg(pk->dsa, BN_dup(DSA_get0_p(k->dsa)), BN_dup(DSA_get0_q(k->dsa)), BN_dup(DSA_get0_g(k->dsa))) != 1) ++ pamsshagentauth_fatal("key_demote: DSA_set0_pqg failed"); ++ if (DSA_set0_key(pk->dsa, BN_dup(DSA_get0_pub_key(k->dsa)), NULL) != 1) ++ pamsshagentauth_fatal("key_demote: DSA_set0_key failed"); ++#endif + break; + case KEY_ECDSA: + pamsshagentauth_fatal("key_demote: implement me"); +diff --git a/ssh-dss.c b/ssh-dss.c +index 9fdaa5d..1051ae2 100644 +--- a/ssh-dss.c ++++ b/ssh-dss.c +@@ -48,37 +48,53 @@ ssh_dss_sign(const Key *key, u_char **sigp, u_int *lenp, + { + DSA_SIG *sig; + const EVP_MD *evp_md = EVP_sha1(); +- EVP_MD_CTX md; ++ EVP_MD_CTX *md; + u_char digest[EVP_MAX_MD_SIZE], sigblob[SIGBLOB_LEN]; + u_int rlen, slen, len, dlen; + Buffer b; ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ const BIGNUM *r, *s; ++#endif + + if (key == NULL || key->type != KEY_DSA || key->dsa == NULL) { + pamsshagentauth_logerror("ssh_dss_sign: no DSA key"); + return -1; + } +- EVP_DigestInit(&md, evp_md); +- EVP_DigestUpdate(&md, data, datalen); +- EVP_DigestFinal(&md, digest, &dlen); ++ md = EVP_MD_CTX_create(); ++ EVP_DigestInit(md, evp_md); ++ EVP_DigestUpdate(md, data, datalen); ++ EVP_DigestFinal(md, digest, &dlen); + + sig = DSA_do_sign(digest, dlen, key->dsa); + memset(digest, 'd', sizeof(digest)); ++ EVP_MD_CTX_destroy(md); + + if (sig == NULL) { + pamsshagentauth_logerror("ssh_dss_sign: sign failed"); + return -1; + } + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + rlen = BN_num_bytes(sig->r); + slen = BN_num_bytes(sig->s); ++#else ++ DSA_SIG_get0((const DSA_SIG *)sig, (const BIGNUM **)r, (const BIGNUM **)s); ++ rlen = BN_num_bytes(r); ++ slen = BN_num_bytes(s); ++#endif + if (rlen > INTBLOB_LEN || slen > INTBLOB_LEN) { + pamsshagentauth_logerror("bad sig size %u %u", rlen, slen); + DSA_SIG_free(sig); + return -1; + } + memset(sigblob, 0, SIGBLOB_LEN); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + BN_bn2bin(sig->r, sigblob+ SIGBLOB_LEN - INTBLOB_LEN - rlen); + BN_bn2bin(sig->s, sigblob+ SIGBLOB_LEN - slen); ++#else ++ BN_bn2bin(r, sigblob+ SIGBLOB_LEN - INTBLOB_LEN - rlen); ++ BN_bn2bin(s, sigblob+ SIGBLOB_LEN - slen); ++#endif + DSA_SIG_free(sig); + + if (datafellows & SSH_BUG_SIGBLOB) { +@@ -110,11 +126,14 @@ ssh_dss_verify(const Key *key, const u_char *signature, u_int signaturelen, + { + DSA_SIG *sig; + const EVP_MD *evp_md = EVP_sha1(); +- EVP_MD_CTX md; ++ EVP_MD_CTX *md; + u_char digest[EVP_MAX_MD_SIZE], *sigblob; + u_int len, dlen; + int rlen, ret; + Buffer b; ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ BIGNUM *r, *s; ++#endif + + if (key == NULL || key->type != KEY_DSA || key->dsa == NULL) { + pamsshagentauth_logerror("ssh_dss_verify: no DSA key"); +@@ -157,6 +176,7 @@ ssh_dss_verify(const Key *key, const u_char *signature, u_int signaturelen, + /* parse signature */ + if ((sig = DSA_SIG_new()) == NULL) + pamsshagentauth_fatal("ssh_dss_verify: DSA_SIG_new failed"); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if ((sig->r = BN_new()) == NULL) + pamsshagentauth_fatal("ssh_dss_verify: BN_new failed"); + if ((sig->s = BN_new()) == NULL) +@@ -164,18 +184,33 @@ ssh_dss_verify(const Key *key, const u_char *signature, u_int signaturelen, + if ((BN_bin2bn(sigblob, INTBLOB_LEN, sig->r) == NULL) || + (BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s) == NULL)) + pamsshagentauth_fatal("ssh_dss_verify: BN_bin2bn failed"); ++#else ++ if ((r = BN_new()) == NULL) ++ pamsshagentauth_fatal("ssh_dss_verify: BN_new failed"); ++ if ((s = BN_new()) == NULL) ++ pamsshagentauth_fatal("ssh_dss_verify: BN_new failed"); ++ if (DSA_SIG_set0(sig, r, s) != 1) ++ pamsshagentauth_fatal("ssh_dss_verify: DSA_SIG_set0 failed"); ++ if ((BN_bin2bn(sigblob, INTBLOB_LEN, r) == NULL) || ++ (BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, s) == NULL)) ++ pamsshagentauth_fatal("ssh_dss_verify: BN_bin2bn failed"); ++ if (DSA_SIG_set0(sig, r, s) != 1) ++ pamsshagentauth_fatal("ssh_dss_verify: DSA_SIG_set0 failed"); ++#endif + + /* clean up */ + memset(sigblob, 0, len); + pamsshagentauth_xfree(sigblob); + + /* sha1 the data */ +- EVP_DigestInit(&md, evp_md); +- EVP_DigestUpdate(&md, data, datalen); +- EVP_DigestFinal(&md, digest, &dlen); ++ md = EVP_MD_CTX_create(); ++ EVP_DigestInit(md, evp_md); ++ EVP_DigestUpdate(md, data, datalen); ++ EVP_DigestFinal(md, digest, &dlen); + + ret = DSA_do_verify(digest, dlen, sig, key->dsa); + memset(digest, 'd', sizeof(digest)); ++ EVP_MD_CTX_destroy(md); + + DSA_SIG_free(sig); + +diff --git a/ssh-ecdsa.c b/ssh-ecdsa.c +index efa0f3d..c213959 100644 +--- a/ssh-ecdsa.c ++++ b/ssh-ecdsa.c +@@ -41,22 +41,27 @@ ssh_ecdsa_sign(const Key *key, u_char **sigp, u_int *lenp, + { + ECDSA_SIG *sig; + const EVP_MD *evp_md = evp_from_key(key); +- EVP_MD_CTX md; ++ EVP_MD_CTX *md; + u_char digest[EVP_MAX_MD_SIZE]; + u_int len, dlen; + Buffer b, bb; ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ BIGNUM *r, *s; ++#endif + + if (key == NULL || key->type != KEY_ECDSA || key->ecdsa == NULL) { + pamsshagentauth_logerror("ssh_ecdsa_sign: no ECDSA key"); + return -1; + } + +- EVP_DigestInit(&md, evp_md); +- EVP_DigestUpdate(&md, data, datalen); +- EVP_DigestFinal(&md, digest, &dlen); ++ md = EVP_MD_CTX_create(); ++ EVP_DigestInit(md, evp_md); ++ EVP_DigestUpdate(md, data, datalen); ++ EVP_DigestFinal(md, digest, &dlen); + + sig = ECDSA_do_sign(digest, dlen, key->ecdsa); + memset(digest, 'd', sizeof(digest)); ++ EVP_MD_CTX_destroy(md); + + if (sig == NULL) { + pamsshagentauth_logerror("ssh_ecdsa_sign: sign failed"); +@@ -64,8 +69,14 @@ ssh_ecdsa_sign(const Key *key, u_char **sigp, u_int *lenp, + } + + pamsshagentauth_buffer_init(&bb); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if (pamsshagentauth_buffer_get_bignum2_ret(&bb, sig->r) == -1 || + pamsshagentauth_buffer_get_bignum2_ret(&bb, sig->s) == -1) { ++#else ++ DSA_SIG_get0(sig, &r, &s); ++ if (pamsshagentauth_buffer_get_bignum2_ret(&bb, r) == -1 || ++ pamsshagentauth_buffer_get_bignum2_ret(&bb, s) == -1) { ++#endif + pamsshagentauth_logerror("couldn't serialize signature"); + ECDSA_SIG_free(sig); + return -1; +@@ -94,11 +105,14 @@ ssh_ecdsa_verify(const Key *key, const u_char *signature, u_int signaturelen, + { + ECDSA_SIG *sig; + const EVP_MD *evp_md = evp_from_key(key); +- EVP_MD_CTX md; ++ EVP_MD_CTX *md; + u_char digest[EVP_MAX_MD_SIZE], *sigblob; + u_int len, dlen; + int rlen, ret; + Buffer b; ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ BIGNUM *r, *s; ++#endif + + if (key == NULL || key->type != KEY_ECDSA || key->ecdsa == NULL) { + pamsshagentauth_logerror("ssh_ecdsa_sign: no ECDSA key"); +@@ -127,8 +141,14 @@ ssh_ecdsa_verify(const Key *key, const u_char *signature, u_int signaturelen, + + pamsshagentauth_buffer_init(&b); + pamsshagentauth_buffer_append(&b, sigblob, len); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if ((pamsshagentauth_buffer_get_bignum2_ret(&b, sig->r) == -1) || + (pamsshagentauth_buffer_get_bignum2_ret(&b, sig->s) == -1)) ++#else ++ DSA_SIG_get0(sig, &r, &s); ++ if ((pamsshagentauth_buffer_get_bignum2_ret(&b, r) == -1) || ++ (pamsshagentauth_buffer_get_bignum2_ret(&b, s) == -1)) ++#endif + pamsshagentauth_fatal("ssh_ecdsa_verify:" + "pamsshagentauth_buffer_get_bignum2_ret failed"); + +@@ -137,16 +157,18 @@ ssh_ecdsa_verify(const Key *key, const u_char *signature, u_int signaturelen, + pamsshagentauth_xfree(sigblob); + + /* sha256 the data */ +- EVP_DigestInit(&md, evp_md); +- EVP_DigestUpdate(&md, data, datalen); +- EVP_DigestFinal(&md, digest, &dlen); ++ md = EVP_MD_CTX_create(); ++ EVP_DigestInit(md, evp_md); ++ EVP_DigestUpdate(md, data, datalen); ++ EVP_DigestFinal(md, digest, &dlen); + + ret = ECDSA_do_verify(digest, dlen, sig, key->ecdsa); + memset(digest, 'd', sizeof(digest)); ++ EVP_MD_CTX_destroy(md); + + ECDSA_SIG_free(sig); + + pamsshagentauth_verbose("ssh_ecdsa_verify: signature %s", + ret == 1 ? "correct" : ret == 0 ? "incorrect" : "error"); + return ret; +-} +\ No newline at end of file ++} +diff --git a/ssh-rsa.c b/ssh-rsa.c +index d05844b..9d74eb6 100644 +--- a/ssh-rsa.c ++++ b/ssh-rsa.c +@@ -40,7 +40,7 @@ ssh_rsa_sign(const Key *key, u_char **sigp, u_int *lenp, + const u_char *data, u_int datalen) + { + const EVP_MD *evp_md; +- EVP_MD_CTX md; ++ EVP_MD_CTX *md; + u_char digest[EVP_MAX_MD_SIZE], *sig; + u_int slen, dlen, len; + int ok, nid; +@@ -55,6 +55,7 @@ ssh_rsa_sign(const Key *key, u_char **sigp, u_int *lenp, + pamsshagentauth_logerror("ssh_rsa_sign: EVP_get_digestbynid %d failed", nid); + return -1; + } ++ md = EVP_MD_CTX_create(); + EVP_DigestInit(&md, evp_md); + EVP_DigestUpdate(&md, data, datalen); + EVP_DigestFinal(&md, digest, &dlen); +@@ -64,6 +65,7 @@ ssh_rsa_sign(const Key *key, u_char **sigp, u_int *lenp, + + ok = RSA_sign(nid, digest, dlen, sig, &len, key->rsa); + memset(digest, 'd', sizeof(digest)); ++ EVP_MD_CTX_destroy(md); + + if (ok != 1) { + int ecode = ERR_get_error(); +@@ -107,7 +109,7 @@ ssh_rsa_verify(const Key *key, const u_char *signature, u_int signaturelen, + { + Buffer b; + const EVP_MD *evp_md; +- EVP_MD_CTX md; ++ EVP_MD_CTX *md; + char *ktype; + u_char digest[EVP_MAX_MD_SIZE], *sigblob; + u_int len, dlen, modlen; +@@ -117,9 +119,17 @@ ssh_rsa_verify(const Key *key, const u_char *signature, u_int signaturelen, + pamsshagentauth_logerror("ssh_rsa_verify: no RSA key"); + return -1; + } ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) { ++#else ++ if (BN_num_bits(RSA_get0_n(key->rsa)) < SSH_RSA_MINIMUM_MODULUS_SIZE) { ++#endif + pamsshagentauth_logerror("ssh_rsa_verify: RSA modulus too small: %d < minimum %d bits", ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + BN_num_bits(key->rsa->n), SSH_RSA_MINIMUM_MODULUS_SIZE); ++#else ++ BN_num_bits(RSA_get0_n(key->rsa)), SSH_RSA_MINIMUM_MODULUS_SIZE); ++#endif + return -1; + } + pamsshagentauth_buffer_init(&b); +@@ -161,12 +171,14 @@ ssh_rsa_verify(const Key *key, const u_char *signature, u_int signaturelen, + pamsshagentauth_xfree(sigblob); + return -1; + } +- EVP_DigestInit(&md, evp_md); +- EVP_DigestUpdate(&md, data, datalen); +- EVP_DigestFinal(&md, digest, &dlen); ++ md = EVP_MD_CTX_create(); ++ EVP_DigestInit(md, evp_md); ++ EVP_DigestUpdate(md, data, datalen); ++ EVP_DigestFinal(md, digest, &dlen); + + ret = openssh_RSA_verify(nid, digest, dlen, sigblob, len, key->rsa); + memset(digest, 'd', sizeof(digest)); ++ EVP_MD_CTX_destroy(md); + memset(sigblob, 's', len); + pamsshagentauth_xfree(sigblob); + pamsshagentauth_verbose("ssh_rsa_verify: signature %scorrect", (ret==0) ? "in" : ""); diff --git a/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth/0002-Check-against-the-correct-OPENSSL_VERSION_NUMBER.patch b/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth/0002-Check-against-the-correct-OPENSSL_VERSION_NUMBER.patch new file mode 100644 index 00000000..b03b43fb --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth/0002-Check-against-the-correct-OPENSSL_VERSION_NUMBER.patch @@ -0,0 +1,365 @@ +From b2ee29809a54e16567323d8fbac2d652ee58c692 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 1 Feb 2019 22:45:19 -0800 +Subject: [PATCH] Check against the correct OPENSSL_VERSION_NUMBER + +From: Guido Falsi <mad@madpilot.net> +https://sources.debian.org/src/pam-ssh-agent-auth/0.10.3-3/debian/patches/openssl-1.1.1-2.patch/ + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + authfd.c | 12 ++++++------ + bufbn.c | 2 +- + key.c | 36 ++++++++++++++++++------------------ + ssh-dss.c | 10 +++++----- + ssh-ecdsa.c | 8 ++++---- + ssh-rsa.c | 4 ++-- + 6 files changed, 36 insertions(+), 36 deletions(-) + +diff --git a/authfd.c b/authfd.c +index f91514d..4c6cec8 100644 +--- a/authfd.c ++++ b/authfd.c +@@ -367,7 +367,7 @@ ssh_get_next_identity(AuthenticationConnection *auth, char **comment, int versio + case 1: + key = pamsshagentauth_key_new(KEY_RSA1); + bits = pamsshagentauth_buffer_get_int(&auth->identities); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + pamsshagentauth_buffer_get_bignum(&auth->identities, key->rsa->e); + pamsshagentauth_buffer_get_bignum(&auth->identities, key->rsa->n); + *comment = pamsshagentauth_buffer_get_string(&auth->identities, NULL); +@@ -427,7 +427,7 @@ ssh_decrypt_challenge(AuthenticationConnection *auth, + } + pamsshagentauth_buffer_init(&buffer); + pamsshagentauth_buffer_put_char(&buffer, SSH_AGENTC_RSA_CHALLENGE); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + pamsshagentauth_buffer_put_int(&buffer, BN_num_bits(key->rsa->n)); + pamsshagentauth_buffer_put_bignum(&buffer, key->rsa->e); + pamsshagentauth_buffer_put_bignum(&buffer, key->rsa->n); +@@ -512,7 +512,7 @@ ssh_agent_sign(AuthenticationConnection *auth, + static void + ssh_encode_identity_rsa1(Buffer *b, RSA *key, const char *comment) + { +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + pamsshagentauth_buffer_put_int(b, BN_num_bits(key->n)); + pamsshagentauth_buffer_put_bignum(b, key->n); + pamsshagentauth_buffer_put_bignum(b, key->e); +@@ -540,7 +540,7 @@ ssh_encode_identity_ssh2(Buffer *b, Key *key, const char *comment) + pamsshagentauth_buffer_put_cstring(b, key_ssh_name(key)); + switch (key->type) { + case KEY_RSA: +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + pamsshagentauth_buffer_put_bignum2(b, key->rsa->n); + pamsshagentauth_buffer_put_bignum2(b, key->rsa->e); + pamsshagentauth_buffer_put_bignum2(b, key->rsa->d); +@@ -557,7 +557,7 @@ ssh_encode_identity_ssh2(Buffer *b, Key *key, const char *comment) + #endif + break; + case KEY_DSA: +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + pamsshagentauth_buffer_put_bignum2(b, key->dsa->p); + pamsshagentauth_buffer_put_bignum2(b, key->dsa->q); + pamsshagentauth_buffer_put_bignum2(b, key->dsa->g); +@@ -649,7 +649,7 @@ ssh_remove_identity(AuthenticationConnection *auth, Key *key) + + if (key->type == KEY_RSA1) { + pamsshagentauth_buffer_put_char(&msg, SSH_AGENTC_REMOVE_RSA_IDENTITY); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + pamsshagentauth_buffer_put_int(&msg, BN_num_bits(key->rsa->n)); + pamsshagentauth_buffer_put_bignum(&msg, key->rsa->e); + pamsshagentauth_buffer_put_bignum(&msg, key->rsa->n); +diff --git a/bufbn.c b/bufbn.c +index 4ecedc1..b4754cc 100644 +--- a/bufbn.c ++++ b/bufbn.c +@@ -151,7 +151,7 @@ pamsshagentauth_buffer_put_bignum2_ret(Buffer *buffer, const BIGNUM *value) + pamsshagentauth_buffer_put_int(buffer, 0); + return 0; + } +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if (value->neg) { + #else + if (BN_is_negative(value)) { +diff --git a/key.c b/key.c +index aedbbb5..dcc5fc8 100644 +--- a/key.c ++++ b/key.c +@@ -77,7 +77,7 @@ pamsshagentauth_key_new(int type) + case KEY_RSA: + if ((rsa = RSA_new()) == NULL) + pamsshagentauth_fatal("key_new: RSA_new failed"); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if ((rsa->n = BN_new()) == NULL) + pamsshagentauth_fatal("key_new: BN_new failed"); + if ((rsa->e = BN_new()) == NULL) +@@ -91,7 +91,7 @@ pamsshagentauth_key_new(int type) + case KEY_DSA: + if ((dsa = DSA_new()) == NULL) + pamsshagentauth_fatal("key_new: DSA_new failed"); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if ((dsa->p = BN_new()) == NULL) + pamsshagentauth_fatal("key_new: BN_new failed"); + if ((dsa->q = BN_new()) == NULL) +@@ -130,7 +130,7 @@ pamsshagentauth_key_new_private(int type) + switch (k->type) { + case KEY_RSA1: + case KEY_RSA: +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if ((k->rsa->d = BN_new()) == NULL) + pamsshagentauth_fatal("key_new_private: BN_new failed"); + if ((k->rsa->iqmp = BN_new()) == NULL) +@@ -153,7 +153,7 @@ pamsshagentauth_key_new_private(int type) + #endif + break; + case KEY_DSA: +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if ((k->dsa->priv_key = BN_new()) == NULL) + pamsshagentauth_fatal("key_new_private: BN_new failed"); + #else +@@ -162,7 +162,7 @@ pamsshagentauth_key_new_private(int type) + #endif + break; + case KEY_ECDSA: +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if (EC_KEY_set_private_key(k->ecdsa, BN_new()) != 1) + pamsshagentauth_fatal("key_new_private: EC_KEY_set_private_key failed"); + #else +@@ -224,7 +224,7 @@ pamsshagentauth_key_equal(const Key *a, const Key *b) + case KEY_RSA1: + case KEY_RSA: + return a->rsa != NULL && b->rsa != NULL && +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + BN_cmp(a->rsa->e, b->rsa->e) == 0 && + BN_cmp(a->rsa->n, b->rsa->n) == 0; + #else +@@ -233,7 +233,7 @@ pamsshagentauth_key_equal(const Key *a, const Key *b) + #endif + case KEY_DSA: + return a->dsa != NULL && b->dsa != NULL && +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + BN_cmp(a->dsa->p, b->dsa->p) == 0 && + BN_cmp(a->dsa->q, b->dsa->q) == 0 && + BN_cmp(a->dsa->g, b->dsa->g) == 0 && +@@ -293,7 +293,7 @@ pamsshagentauth_key_fingerprint_raw(const Key *k, enum fp_type dgst_type, + } + switch (k->type) { + case KEY_RSA1: +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + nlen = BN_num_bytes(k->rsa->n); + elen = BN_num_bytes(k->rsa->e); + len = nlen + elen; +@@ -510,7 +510,7 @@ pamsshagentauth_key_read(Key *ret, char **cpp) + return -1; + *cpp = cp; + /* Get public exponent, public modulus. */ +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if (!read_bignum(cpp, ret->rsa->e)) + return -1; + if (!read_bignum(cpp, ret->rsa->n)) +@@ -643,7 +643,7 @@ pamsshagentauth_key_write(const Key *key, FILE *f) + + if (key->type == KEY_RSA1 && key->rsa != NULL) { + /* size of modulus 'n' */ +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + bits = BN_num_bits(key->rsa->n); + fprintf(f, "%u", bits); + if (write_bignum(f, key->rsa->e) && +@@ -742,7 +742,7 @@ pamsshagentauth_key_size(const Key *k) + { + switch (k->type) { + case KEY_RSA1: +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + case KEY_RSA: + return BN_num_bits(k->rsa->n); + case KEY_DSA: +@@ -843,7 +843,7 @@ pamsshagentauth_key_from_private(const Key *k) + switch (k->type) { + case KEY_DSA: + n = pamsshagentauth_key_new(k->type); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if ((BN_copy(n->dsa->p, k->dsa->p) == NULL) || + (BN_copy(n->dsa->q, k->dsa->q) == NULL) || + (BN_copy(n->dsa->g, k->dsa->g) == NULL) || +@@ -859,7 +859,7 @@ pamsshagentauth_key_from_private(const Key *k) + case KEY_RSA: + case KEY_RSA1: + n = pamsshagentauth_key_new(k->type); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if ((BN_copy(n->rsa->n, k->rsa->n) == NULL) || + (BN_copy(n->rsa->e, k->rsa->e) == NULL)) + #else +@@ -967,7 +967,7 @@ pamsshagentauth_key_from_blob(const u_char *blob, u_int blen) + switch (type) { + case KEY_RSA: + key = pamsshagentauth_key_new(type); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if (pamsshagentauth_buffer_get_bignum2_ret(&b, key->rsa->e) == -1 || + pamsshagentauth_buffer_get_bignum2_ret(&b, key->rsa->n) == -1) { + #else +@@ -985,7 +985,7 @@ pamsshagentauth_key_from_blob(const u_char *blob, u_int blen) + break; + case KEY_DSA: + key = pamsshagentauth_key_new(type); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if (pamsshagentauth_buffer_get_bignum2_ret(&b, key->dsa->p) == -1 || + pamsshagentauth_buffer_get_bignum2_ret(&b, key->dsa->q) == -1 || + pamsshagentauth_buffer_get_bignum2_ret(&b, key->dsa->g) == -1 || +@@ -1113,7 +1113,7 @@ pamsshagentauth_key_to_blob(const Key *key, u_char **blobp, u_int *lenp) + } + pamsshagentauth_buffer_init(&b); + switch (key->type) { +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + case KEY_DSA: + pamsshagentauth_buffer_put_cstring(&b, key_ssh_name(key)); + pamsshagentauth_buffer_put_bignum2(&b, key->dsa->p); +@@ -1251,7 +1251,7 @@ pamsshagentauth_key_demote(const Key *k) + case KEY_RSA: + if ((pk->rsa = RSA_new()) == NULL) + pamsshagentauth_fatal("key_demote: RSA_new failed"); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if ((pk->rsa->e = BN_dup(k->rsa->e)) == NULL) + pamsshagentauth_fatal("key_demote: BN_dup failed"); + if ((pk->rsa->n = BN_dup(k->rsa->n)) == NULL) +@@ -1264,7 +1264,7 @@ pamsshagentauth_key_demote(const Key *k) + case KEY_DSA: + if ((pk->dsa = DSA_new()) == NULL) + pamsshagentauth_fatal("key_demote: DSA_new failed"); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if ((pk->dsa->p = BN_dup(k->dsa->p)) == NULL) + pamsshagentauth_fatal("key_demote: BN_dup failed"); + if ((pk->dsa->q = BN_dup(k->dsa->q)) == NULL) +diff --git a/ssh-dss.c b/ssh-dss.c +index 1051ae2..9b96274 100644 +--- a/ssh-dss.c ++++ b/ssh-dss.c +@@ -52,7 +52,7 @@ ssh_dss_sign(const Key *key, u_char **sigp, u_int *lenp, + u_char digest[EVP_MAX_MD_SIZE], sigblob[SIGBLOB_LEN]; + u_int rlen, slen, len, dlen; + Buffer b; +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100005L + const BIGNUM *r, *s; + #endif + +@@ -74,7 +74,7 @@ ssh_dss_sign(const Key *key, u_char **sigp, u_int *lenp, + return -1; + } + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + rlen = BN_num_bytes(sig->r); + slen = BN_num_bytes(sig->s); + #else +@@ -88,7 +88,7 @@ ssh_dss_sign(const Key *key, u_char **sigp, u_int *lenp, + return -1; + } + memset(sigblob, 0, SIGBLOB_LEN); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + BN_bn2bin(sig->r, sigblob+ SIGBLOB_LEN - INTBLOB_LEN - rlen); + BN_bn2bin(sig->s, sigblob+ SIGBLOB_LEN - slen); + #else +@@ -131,7 +131,7 @@ ssh_dss_verify(const Key *key, const u_char *signature, u_int signaturelen, + u_int len, dlen; + int rlen, ret; + Buffer b; +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100005L + BIGNUM *r, *s; + #endif + +@@ -176,7 +176,7 @@ ssh_dss_verify(const Key *key, const u_char *signature, u_int signaturelen, + /* parse signature */ + if ((sig = DSA_SIG_new()) == NULL) + pamsshagentauth_fatal("ssh_dss_verify: DSA_SIG_new failed"); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if ((sig->r = BN_new()) == NULL) + pamsshagentauth_fatal("ssh_dss_verify: BN_new failed"); + if ((sig->s = BN_new()) == NULL) +diff --git a/ssh-ecdsa.c b/ssh-ecdsa.c +index c213959..5b13b30 100644 +--- a/ssh-ecdsa.c ++++ b/ssh-ecdsa.c +@@ -45,7 +45,7 @@ ssh_ecdsa_sign(const Key *key, u_char **sigp, u_int *lenp, + u_char digest[EVP_MAX_MD_SIZE]; + u_int len, dlen; + Buffer b, bb; +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100005L + BIGNUM *r, *s; + #endif + +@@ -69,7 +69,7 @@ ssh_ecdsa_sign(const Key *key, u_char **sigp, u_int *lenp, + } + + pamsshagentauth_buffer_init(&bb); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if (pamsshagentauth_buffer_get_bignum2_ret(&bb, sig->r) == -1 || + pamsshagentauth_buffer_get_bignum2_ret(&bb, sig->s) == -1) { + #else +@@ -110,7 +110,7 @@ ssh_ecdsa_verify(const Key *key, const u_char *signature, u_int signaturelen, + u_int len, dlen; + int rlen, ret; + Buffer b; +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100005L + BIGNUM *r, *s; + #endif + +@@ -141,7 +141,7 @@ ssh_ecdsa_verify(const Key *key, const u_char *signature, u_int signaturelen, + + pamsshagentauth_buffer_init(&b); + pamsshagentauth_buffer_append(&b, sigblob, len); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if ((pamsshagentauth_buffer_get_bignum2_ret(&b, sig->r) == -1) || + (pamsshagentauth_buffer_get_bignum2_ret(&b, sig->s) == -1)) + #else +diff --git a/ssh-rsa.c b/ssh-rsa.c +index 9d74eb6..35f2e36 100644 +--- a/ssh-rsa.c ++++ b/ssh-rsa.c +@@ -119,13 +119,13 @@ ssh_rsa_verify(const Key *key, const u_char *signature, u_int signaturelen, + pamsshagentauth_logerror("ssh_rsa_verify: no RSA key"); + return -1; + } +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) { + #else + if (BN_num_bits(RSA_get0_n(key->rsa)) < SSH_RSA_MINIMUM_MODULUS_SIZE) { + #endif + pamsshagentauth_logerror("ssh_rsa_verify: RSA modulus too small: %d < minimum %d bits", +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100005L + BN_num_bits(key->rsa->n), SSH_RSA_MINIMUM_MODULUS_SIZE); + #else + BN_num_bits(RSA_get0_n(key->rsa)), SSH_RSA_MINIMUM_MODULUS_SIZE); diff --git a/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth_0.10.3.bb b/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth_0.10.3.bb index 2a461fc1..7871801b 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth_0.10.3.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth_0.10.3.bb @@ -7,13 +7,16 @@ LIC_FILES_CHKSUM = "file://LICENSE.OpenSSL;md5=8ab01146141ded59b75f8ba7811ed05a file://OPENSSH_LICENSE;md5=7ae09218173be1643c998a4b71027f9b \ " -SRC_URI = "http://sourceforge.net/projects/pamsshagentauth/files/pam_ssh_agent_auth/v${PV}/pam_ssh_agent_auth-${PV}.tar.bz2" +SRC_URI = "http://sourceforge.net/projects/pamsshagentauth/files/pam_ssh_agent_auth/v${PV}/pam_ssh_agent_auth-${PV}.tar.bz2 \ + file://0001-Adapt-to-OpenSSL-1.1.1.patch \ + file://0002-Check-against-the-correct-OPENSSL_VERSION_NUMBER.patch \ + " SRC_URI[md5sum] = "8dbe90ab3625e545036333e6f51ccf1d" SRC_URI[sha256sum] = "3c53d358d6eaed1b211239df017c27c6f9970995d14102ae67bae16d4f47a763" -DEPENDS += "libpam openssl10" +DEPENDS += "libpam openssl" -inherit distro_features_check +inherit features_check REQUIRED_DISTRO_FEATURES = "pam" # This gets us ssh-agent, which we are almost certain to want. @@ -24,7 +27,7 @@ RDEPENDS_${PN} += "openssh-misc" # S = "${WORKDIR}/pam_ssh_agent_auth-${PV}" -inherit autotools-brokensep +inherit autotools-brokensep perlnative # Avoid autoreconf. Override the --libexec oe_runconf specifies so that # the module is put with the other pam modules. Because it cannot, in general, diff --git a/external/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl_2.8.3.bb b/external/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl_2.8.3.bb new file mode 100644 index 00000000..92741d81 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl_2.8.3.bb @@ -0,0 +1,12 @@ +DESCRIPTION="header-only library for creating parsers according to Parsing Expression Grammar" +HOMEPAGE="https://github.com/taocpp/PEGTL" +LICENSE="MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6a5195f720a8d436a4148e0cb8660400" + +SRCREV = "47e878ad4fd72c91253c9d47b6f17e001ca2dfcf" +SRC_URI = "git://github.com/taocpp/PEGTL.git;protocol=https;branch=2.x \ + " + +inherit cmake + +S = "${WORKDIR}/git" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch b/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch index 747538b0..ca2a1f64 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch +++ b/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch @@ -1,4 +1,4 @@ -From 2a22dc96c3bbb5c9bbcc008f58d4f5c64e3d19e6 Mon Sep 17 00:00:00 2001 +From 231eb4c75fbfaaf90bca7702bdaf55cf701a3527 Mon Sep 17 00:00:00 2001 From: Alistair Francis <alistair.francis@wdc.com> Date: Mon, 23 Jul 2018 11:23:39 -0700 Subject: [PATCH] jemalloc/jemalloc.cfg: Specify the host when building @@ -25,5 +25,5 @@ index 196129de6..79ebbab1c 100644 --disable-munmap +--host=${HOST_SYS} -- -2.17.1 +2.14.4 diff --git a/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0001-os_posix-Use-__FreeBSD__-to-control-secure_getenv-de.patch b/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0001-os_posix-Use-__FreeBSD__-to-control-secure_getenv-de.patch new file mode 100644 index 00000000..33f25b6a --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch b/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch index bd1b97c2..82b96cf9 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch +++ b/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch @@ -1,7 +1,7 @@ -From 460a96e390cb80278784cfe36629e280fe7ffef7 Mon Sep 17 00:00:00 2001 +From 3863d8bd71d6a5638cf984f8d8f9cccac0c7f2a4 Mon Sep 17 00:00:00 2001 From: Alistair Francis <alistair.francis@wdc.com> Date: Mon, 23 Jul 2018 11:31:17 -0700 -Subject: [PATCH 2/2] Makefile: Don't install the docs +Subject: [PATCH] Makefile: Don't install the docs Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Upstream-Status: Inappropriate [disable feature] @@ -10,17 +10,17 @@ Upstream-Status: Inappropriate [disable feature] 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile -index 224a315f6..ce7f84afb 100644 +index 47a447f12..7c0f9848f 100644 --- a/Makefile +++ b/Makefile -@@ -144,7 +144,6 @@ rpm dpkg: pkg-clean source +@@ -148,7 +148,6 @@ rpm dpkg: pkg-clean install uninstall: $(MAKE) -C src $@ - $(MAKE) -C doc $@ .PHONY: all clean clobber test check cstyle check-license install uninstall\ - source rpm dpkg pkg-clean pcheck check-remote format doc $(SUBDIRS) + source rpm dpkg pkg-clean pcheck check-remote format doc require-rpmem\ -- -2.17.1 +2.14.4 diff --git a/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0003-Makefile-Don-t-build-the-examples.patch b/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0003-Makefile-Don-t-build-the-examples.patch deleted file mode 100644 index f75d9419..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0003-Makefile-Don-t-build-the-examples.patch +++ /dev/null @@ -1,34 +0,0 @@ -From a7f07dca2468ea226d2f07fc0105166e75cadaf8 Mon Sep 17 00:00:00 2001 -From: Alistair Francis <alistair.francis@wdc.com> -Date: Thu, 6 Sep 2018 16:18:50 -0700 -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 4b50dd8b5..e00501e31 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -38,13 +38,13 @@ include $(TOP)/src/version.inc - - TARGETS = libpmem libvmem libpmemblk libpmemlog libpmemobj libpmempool\ - libpmemcto 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 libpmemcto --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.17.1 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0004-os_posix-Manually-implement-secure_getenv-if-require.patch b/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0004-os_posix-Manually-implement-secure_getenv-if-require.patch deleted file mode 100644 index 624f17bd..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0004-os_posix-Manually-implement-secure_getenv-if-require.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 33affa9ee97691efb73f439fcdba4adb8625a26a Mon Sep 17 00:00:00 2001 -From: Alistair Francis <alistair.francis@wdc.com> -Date: Mon, 10 Sep 2018 12:59:48 -0700 -Subject: [PATCH] os_posix: Manually implement secure_getenv() if required - -Manually implement the secure_getenv() if we need to, this is required -if using musl. - -Signed-off-by: Alistair Francis <alistair.francis@wdc.com> -Upstream-Status: Pending ---- - 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 2d70a0a29..fb09b6ce0 100644 ---- a/src/common/os_posix.c -+++ b/src/common/os_posix.c -@@ -261,7 +261,7 @@ os_setenv(const char *name, const char *value, int overwrite) - /* - * secure_getenv -- provide GNU secure_getenv for FreeBSD - */ --#ifdef __FreeBSD__ -+#if defined(__FreeBSD__) || !HAVE___SECURE_GETENV - static char * - secure_getenv(const char *name) - { --- -2.17.1 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0005-pmempool-Remove-unused-__USE_UNIX98-define.patch b/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0005-pmempool-Remove-unused-__USE_UNIX98-define.patch deleted file mode 100644 index 75c35f86..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0005-pmempool-Remove-unused-__USE_UNIX98-define.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 92e63699ea83074298971b0251f002562be4dbd3 Mon Sep 17 00:00:00 2001 -From: Alistair Francis <alistair.francis@wdc.com> -Date: Mon, 10 Sep 2018 13:23:37 -0700 -Subject: [PATCH 2/3] pmempool: Remove unused __USE_UNIX98 define - -Remove the unused __USE_UNIX98 to fix musl build failures. - -Signed-off-by: Alistair Francis <alistair.francis@wdc.com> -Upstream-Status: Pending ---- - src/tools/pmempool/info.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/src/tools/pmempool/info.c b/src/tools/pmempool/info.c -index b4010bf35..7b890a123 100644 ---- a/src/tools/pmempool/info.c -+++ b/src/tools/pmempool/info.c -@@ -45,9 +45,6 @@ - #include <inttypes.h> - #include <assert.h> - #include <sys/param.h> --#ifndef __FreeBSD__ --#define __USE_UNIX98 --#endif - #include <unistd.h> - #include <sys/mman.h> - --- -2.17.1 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0006-Makefile.inc-Allow-extra-libs-to-be-specified.patch b/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0006-Makefile.inc-Allow-extra-libs-to-be-specified.patch deleted file mode 100644 index 2042fdb2..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0006-Makefile.inc-Allow-extra-libs-to-be-specified.patch +++ /dev/null @@ -1,29 +0,0 @@ -From a88e806f9ce8cc071e81abad688643d53f393176 Mon Sep 17 00:00:00 2001 -From: Alistair Francis <alistair.francis@wdc.com> -Date: Mon, 10 Sep 2018 14:18:38 -0700 -Subject: [PATCH 3/3] Makefile.inc: Allow extra libs to be specified - -Signed-off-by: Alistair Francis <alistair.francis@wdc.com> -Upstream-Status: Pending ---- - src/Makefile.inc | 2 ++ - src/common.inc | 2 ++ - src/tools/Makefile.inc | 1 + - 3 files changed, 5 insertions(+) - -diff --git a/src/common.inc b/src/common.inc -index 032cb83ea..2d5c4bedf 100644 ---- a/src/common.inc -+++ b/src/common.inc -@@ -74,6 +74,8 @@ GCOV_CFLAGS=-fprofile-arcs -ftest-coverage --coverage - GCOV_LDFLAGS=-fprofile-arcs -ftest-coverage - GCOV_LIBS=-lgcov - -+LIBS += $(EXTRA_LIBS) -+ - osdep = $(1)_$(shell uname -s | tr "[:upper:]" "[:lower:]")$(2) - get_arch = $(shell $(CC) -dumpmachine | awk -F'[/-]' '{print $$1}') - --- -2.17.1 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_1.4.2.bb b/external/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_1.7.bb index 3da22a97..f5066da0 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_1.4.2.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_1.7.bb @@ -2,25 +2,22 @@ SUMMARY = "Persistent Memory Development Kit" DESCRIPTION = "Persistent Memory Development Kit" HOMEPAGE = "http://pmem.io" SECTION = "libs" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=7db1106255a1baa80391fd2e21eebab7" DEPENDS = "ndctl" # Required to have the fts.h header for musl DEPENDS_append_libc-musl = " fts" -SRC_URI = "https://github.com/pmem/${BPN}/archive/${PV}.tar.gz \ +S = "${WORKDIR}/git" + +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://0005-pmempool-Remove-unused-__USE_UNIX98-define.patch \ - file://0006-Makefile.inc-Allow-extra-libs-to-be-specified.patch \ + file://0001-os_posix-Use-__FreeBSD__-to-control-secure_getenv-de.patch \ " -SRC_URI_append_libc-musl = " file://0004-os_posix-Manually-implement-secure_getenv-if-require.patch" - -SRC_URI[md5sum] = "bde73bca9ef5b90911deb0fdcfb15ccf" -SRC_URI[sha256sum] = "df7e658e75d28cd80f6d2ff7b9fc9ae2885d52f8923fdbacecfd46215115fb4c" +SRCREV = "bc5e309485df61c452d08367e4b13ba9dfed5071" inherit autotools-brokensep pkgconfig @@ -29,36 +26,24 @@ inherit autotools-brokensep pkgconfig # | 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}'" +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'" do_install() { - oe_runmake PREFIX=${prefix} DESTDIR=${D} install - - # Copy these into the standard directories - install -d ${D}${bindir}/ - mv ${D}/usr/local/bin/pmempool ${D}${bindir}/ - mv ${D}/usr/local/bin/daxio ${D}${bindir}/ - - install -d ${D}${libdir} - mv ${D}/usr/local/lib/*so* ${D}${libdir}/ - - install -d ${D}${libdir}/pkgconfig - mv ${D}/usr/local/lib/pkgconfig/*.pc ${D}${libdir}/pkgconfig/ - - install -d ${D}${includedir} - mv ${D}/usr/local/include/* ${D}${includedir}/ + oe_runmake prefix=${prefix} DESTDIR=${D} install # Remove uneeded files - rm -rf ${D}/usr/local/ + rm -rf ${D}/usr/${baselib}/pmdk_debug } # Include these by default otherwise the SDK is not very useful FILES_${PN} += "${bindir}/pmempool ${bindir}/daxio" FILES_${PN} += "${libdir}/*so*" FILES_${PN} += "${libdir}/pkgconfig/*.pc" -FILES_${PN} += "${includedir}/libpmemobj++/* ${includedir}/libpmemobj/*" +FILES_${PN} += "${includedir}/libpmemobj++/* ${includedir}/libpmemobj/* /usr/*/include/" +FILES_${PN} += "/usr/etc" +FILES_${PN} += "/usr/share" COMPATIBLE_HOST='(x86_64).*' diff --git a/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule.inc b/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule.inc index 40e40054..e38e344c 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule.inc +++ b/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit-group-rule.inc @@ -1,10 +1,13 @@ # polkit must prepare polkitd group DEPENDS += "polkit" +inherit features_check +REQUIRED_DISTRO_FEATURES = "polkit" + inherit useradd do_install_prepend() { install -m 700 -d ${D}${sysconfdir}/polkit-1/rules.d - chown polkitd:polkitd ${D}${sysconfdir}/polkit-1/rules.d + chown polkitd:root ${D}/${sysconfdir}/polkit-1/rules.d } USERADD_PARAM_${PN}_prepend = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0001-make-netgroup-support-configurable.patch b/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0001-make-netgroup-support-configurable.patch deleted file mode 100644 index 3b0ef5e5..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0001-make-netgroup-support-configurable.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 7d5e205aa58a10e7b1ccc2fa75b443508a5c3e18 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 20 Jan 2016 04:31:59 +0000 -Subject: [PATCH] make netgroup support configurable - -Disable using innetgr and *netigrent function if not available - -These functions are not available on all libc implementations e.g. musl -doesnt have them. - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - -Rebase to 0.115 -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - configure.ac | 2 +- - src/polkitbackend/polkitbackendinteractiveauthority.c | 6 +++++- - src/polkitbackend/polkitbackendjsauthority.cpp | 2 ++ - 3 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 8b3e1b1..1c392df 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -99,7 +99,7 @@ AC_CHECK_LIB(expat,XML_ParserCreate,[EXPAT_LIBS="-lexpat"], - [AC_MSG_ERROR([Can't find expat library. Please install expat.])]) - AC_SUBST(EXPAT_LIBS) - --AC_CHECK_FUNCS(clearenv fdatasync) -+AC_CHECK_FUNCS(clearenv fdatasync getnetgrent innetgr) - - if test "x$GCC" = "xyes"; then - LDFLAGS="-Wl,--as-needed $LDFLAGS" -diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c -index cb6fdab..de3f752 100644 ---- a/src/polkitbackend/polkitbackendinteractiveauthority.c -+++ b/src/polkitbackend/polkitbackendinteractiveauthority.c -@@ -2224,7 +2224,7 @@ get_users_in_group (PolkitIdentity *group, - out: - return ret; - } -- -+#if defined HAVE_GETNETGRENT - static GList * - get_users_in_net_group (PolkitIdentity *group, - gboolean include_root) -@@ -2285,6 +2285,8 @@ get_users_in_net_group (PolkitIdentity *group, - return ret; - } - -+#endif -+ - /* ---------------------------------------------------------------------------------------------------- */ - - static void -@@ -2369,10 +2371,12 @@ authentication_agent_initiate_challenge (AuthenticationAgent *agent, - { - user_identities = g_list_concat (user_identities, get_users_in_group (identity, FALSE)); - } -+#if defined HAVE_GETNETGRENT - else if (POLKIT_IS_UNIX_NETGROUP (identity)) - { - user_identities = g_list_concat (user_identities, get_users_in_net_group (identity, FALSE)); - } -+#endif - else - { - g_warning ("Unsupported identity"); -diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp -index 517f3c6..6042dd2 100644 ---- a/src/polkitbackend/polkitbackendjsauthority.cpp -+++ b/src/polkitbackend/polkitbackendjsauthority.cpp -@@ -1502,6 +1502,7 @@ js_polkit_user_is_in_netgroup (JSContext *cx, - user = JS_EncodeString (cx, args[0].toString()); - netgroup = JS_EncodeString (cx, args[1].toString()); - -+#if defined HAVE_INNETGR - if (innetgr (netgroup, - NULL, /* host */ - user, -@@ -1509,6 +1510,7 @@ js_polkit_user_is_in_netgroup (JSContext *cx, - { - is_in_netgroup = true; - } -+#endif - - JS_free (cx, netgroup); - JS_free (cx, user); --- -2.7.4 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0003-make-netgroup-support-optional.patch b/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0003-make-netgroup-support-optional.patch new file mode 100644 index 00000000..fd725136 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0003-make-netgroup-support-optional.patch @@ -0,0 +1,232 @@ +From 21aa2747e8f0048759aab184b07dd6389666d5e6 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 22 May 2019 13:18:55 -0700 +Subject: [PATCH] make netgroup support optional + +On at least Linux/musl and Linux/uclibc, netgroup +support is not available. PolKit fails to compile on these systems +for that reason. + +This change makes netgroup support conditional on the presence of the +setnetgrent(3) function which is required for the support to work. If +that function is not available on the system, an error will be returned +to the administrator if unix-netgroup: is specified in configuration. + +Fixes bug 50145. + +Closes polkit/polkit#14. +Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 2 +- + src/polkit/polkitidentity.c | 16 ++++++++++++++++ + src/polkit/polkitunixnetgroup.c | 3 +++ + .../polkitbackendinteractiveauthority.c | 14 ++++++++------ + src/polkitbackend/polkitbackendjsauthority.cpp | 2 ++ + test/polkit/polkitidentitytest.c | 9 ++++++++- + test/polkit/polkitunixnetgrouptest.c | 3 +++ + .../test-polkitbackendjsauthority.c | 2 ++ + 8 files changed, 43 insertions(+), 8 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -99,7 +99,7 @@ AC_CHECK_LIB(expat,XML_ParserCreate,[EXP + [AC_MSG_ERROR([Can't find expat library. Please install expat.])]) + AC_SUBST(EXPAT_LIBS) + +-AC_CHECK_FUNCS(clearenv fdatasync) ++AC_CHECK_FUNCS(clearenv fdatasync setnetgrent) + + if test "x$GCC" = "xyes"; then + LDFLAGS="-Wl,--as-needed $LDFLAGS" +--- a/src/polkit/polkitidentity.c ++++ b/src/polkit/polkitidentity.c +@@ -182,7 +182,15 @@ polkit_identity_from_string (const gcha + } + else if (g_str_has_prefix (str, "unix-netgroup:")) + { ++#ifndef HAVE_SETNETGRENT ++ g_set_error (error, ++ POLKIT_ERROR, ++ POLKIT_ERROR_FAILED, ++ "Netgroups are not available on this machine ('%s')", ++ str); ++#else + identity = polkit_unix_netgroup_new (str + sizeof "unix-netgroup:" - 1); ++#endif + } + + if (identity == NULL && (error != NULL && *error == NULL)) +@@ -344,6 +352,13 @@ polkit_identity_new_for_gvariant (GVaria + GVariant *v; + const char *name; + ++#ifndef HAVE_SETNETGRENT ++ g_set_error (error, ++ POLKIT_ERROR, ++ POLKIT_ERROR_FAILED, ++ "Netgroups are not available on this machine"); ++ goto out; ++#else + v = lookup_asv (details_gvariant, "name", G_VARIANT_TYPE_STRING, error); + if (v == NULL) + { +@@ -353,6 +368,7 @@ polkit_identity_new_for_gvariant (GVaria + name = g_variant_get_string (v, NULL); + ret = polkit_unix_netgroup_new (name); + g_variant_unref (v); ++#endif + } + else + { +--- a/src/polkit/polkitunixnetgroup.c ++++ b/src/polkit/polkitunixnetgroup.c +@@ -194,6 +194,9 @@ polkit_unix_netgroup_set_name (PolkitUni + PolkitIdentity * + polkit_unix_netgroup_new (const gchar *name) + { ++#ifndef HAVE_SETNETGRENT ++ g_assert_not_reached(); ++#endif + g_return_val_if_fail (name != NULL, NULL); + return POLKIT_IDENTITY (g_object_new (POLKIT_TYPE_UNIX_NETGROUP, + "name", name, +--- a/src/polkitbackend/polkitbackendinteractiveauthority.c ++++ b/src/polkitbackend/polkitbackendinteractiveauthority.c +@@ -2233,25 +2233,26 @@ get_users_in_net_group (PolkitIdentity + GList *ret; + + ret = NULL; ++#ifdef HAVE_SETNETGRENT + name = polkit_unix_netgroup_get_name (POLKIT_UNIX_NETGROUP (group)); + +-#ifdef HAVE_SETNETGRENT_RETURN ++# ifdef HAVE_SETNETGRENT_RETURN + if (setnetgrent (name) == 0) + { + g_warning ("Error looking up net group with name %s: %s", name, g_strerror (errno)); + goto out; + } +-#else ++# else + setnetgrent (name); +-#endif ++# endif /* HAVE_SETNETGRENT_RETURN */ + + for (;;) + { +-#if defined(HAVE_NETBSD) || defined(HAVE_OPENBSD) ++# if defined(HAVE_NETBSD) || defined(HAVE_OPENBSD) + const char *hostname, *username, *domainname; +-#else ++# else + char *hostname, *username, *domainname; +-#endif ++# endif /* defined(HAVE_NETBSD) || defined(HAVE_OPENBSD) */ + PolkitIdentity *user; + GError *error = NULL; + +@@ -2282,6 +2283,7 @@ get_users_in_net_group (PolkitIdentity + + out: + endnetgrent (); ++#endif /* HAVE_SETNETGRENT */ + return ret; + } + +--- a/src/polkitbackend/polkitbackendjsauthority.cpp ++++ b/src/polkitbackend/polkitbackendjsauthority.cpp +@@ -1502,6 +1502,7 @@ js_polkit_user_is_in_netgroup (JSContext + + JS::CallArgs args = JS::CallArgsFromVp (argc, vp); + ++#ifdef HAVE_SETNETGRENT + JS::RootedString usrstr (authority->priv->cx); + usrstr = args[0].toString(); + user = JS_EncodeStringToUTF8 (cx, usrstr); +@@ -1519,6 +1520,7 @@ js_polkit_user_is_in_netgroup (JSContext + + JS_free (cx, netgroup); + JS_free (cx, user); ++#endif + + ret = true; + +--- a/test/polkit/polkitidentitytest.c ++++ b/test/polkit/polkitidentitytest.c +@@ -19,6 +19,7 @@ + * Author: Nikki VonHollen <vonhollen@google.com> + */ + ++#include "config.h" + #include "glib.h" + #include <polkit/polkit.h> + #include <polkit/polkitprivate.h> +@@ -145,11 +146,15 @@ struct ComparisonTestData comparison_tes + {"unix-group:root", "unix-group:jane", FALSE}, + {"unix-group:jane", "unix-group:jane", TRUE}, + ++#ifdef HAVE_SETNETGRENT + {"unix-netgroup:foo", "unix-netgroup:foo", TRUE}, + {"unix-netgroup:foo", "unix-netgroup:bar", FALSE}, ++#endif + + {"unix-user:root", "unix-group:root", FALSE}, ++#ifdef HAVE_SETNETGRENT + {"unix-user:jane", "unix-netgroup:foo", FALSE}, ++#endif + + {NULL}, + }; +@@ -181,11 +186,13 @@ main (int argc, char *argv[]) + g_test_add_data_func ("/PolkitIdentity/group_string_2", "unix-group:jane", test_string); + g_test_add_data_func ("/PolkitIdentity/group_string_3", "unix-group:users", test_string); + ++#ifdef HAVE_SETNETGRENT + g_test_add_data_func ("/PolkitIdentity/netgroup_string", "unix-netgroup:foo", test_string); ++ g_test_add_data_func ("/PolkitIdentity/netgroup_gvariant", "unix-netgroup:foo", test_gvariant); ++#endif + + g_test_add_data_func ("/PolkitIdentity/user_gvariant", "unix-user:root", test_gvariant); + g_test_add_data_func ("/PolkitIdentity/group_gvariant", "unix-group:root", test_gvariant); +- g_test_add_data_func ("/PolkitIdentity/netgroup_gvariant", "unix-netgroup:foo", test_gvariant); + + add_comparison_tests (); + +--- a/test/polkit/polkitunixnetgrouptest.c ++++ b/test/polkit/polkitunixnetgrouptest.c +@@ -19,6 +19,7 @@ + * Author: Nikki VonHollen <vonhollen@google.com> + */ + ++#include "config.h" + #include "glib.h" + #include <polkit/polkit.h> + #include <string.h> +@@ -69,7 +70,9 @@ int + main (int argc, char *argv[]) + { + g_test_init (&argc, &argv, NULL); ++#ifdef HAVE_SETNETGRENT + g_test_add_func ("/PolkitUnixNetgroup/new", test_new); + g_test_add_func ("/PolkitUnixNetgroup/set_name", test_set_name); ++#endif + return g_test_run (); + } +--- a/test/polkitbackend/test-polkitbackendjsauthority.c ++++ b/test/polkitbackend/test-polkitbackendjsauthority.c +@@ -137,12 +137,14 @@ test_get_admin_identities (void) + "unix-group:users" + } + }, ++#ifdef HAVE_SETNETGRENT + { + "net.company.action3", + { + "unix-netgroup:foo" + } + }, ++#endif + }; + guint n; + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/CVE-2018-19788_p1.patch b/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/CVE-2018-19788_p1.patch deleted file mode 100644 index 32ea0bac..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/CVE-2018-19788_p1.patch +++ /dev/null @@ -1,194 +0,0 @@ -From cd80aa29c85745ca073cf0581ccdcf2f80aa30db Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> -Date: Mon, 3 Dec 2018 10:28:58 +0100 -Subject: [PATCH 1/3] Allow negative uids/gids in PolkitUnixUser and Group - objects - -(uid_t) -1 is still used as placeholder to mean "unset". This is OK, since -there should be no users with such number, see -https://systemd.io/UIDS-GIDS#special-linux-uids. - -(uid_t) -1 is used as the default value in class initialization. - -When a user or group above INT32_MAX is created, the numeric uid or -gid wraps around to negative when the value is assigned to gint, and -polkit gets confused. Let's accept such gids, except for -1. - -A nicer fix would be to change the underlying type to e.g. uint32 to -not have negative values. But this cannot be done without breaking the -API, so likely new functions will have to be added (a -polkit_unix_user_new variant that takes a unsigned, and the same for -_group_new, _set_uid, _get_uid, _set_gid, _get_gid, etc.). This will -require a bigger patch. - -Fixes https://gitlab.freedesktop.org/polkit/polkit/issues/74. - -CVE: CVE-2018-19788 -Upstream-Status: Backport -[https://gitlab.freedesktop.org/polkit/polkit/commit/2cb40c4d5feeaa09325522bd7d97910f1b59e379] - -Signed-off-by: Dan Tran <dantran@microsoft.com> ---- - src/polkit/polkitunixgroup.c | 15 +++++++++++---- - src/polkit/polkitunixprocess.c | 12 ++++++++---- - src/polkit/polkitunixuser.c | 13 ++++++++++--- - 3 files changed, 29 insertions(+), 11 deletions(-) - -diff --git a/src/polkit/polkitunixgroup.c b/src/polkit/polkitunixgroup.c -index c57a1aa..309f689 100644 ---- a/src/polkit/polkitunixgroup.c -+++ b/src/polkit/polkitunixgroup.c -@@ -71,6 +71,7 @@ G_DEFINE_TYPE_WITH_CODE (PolkitUnixGroup, polkit_unix_group, G_TYPE_OBJECT, - static void - polkit_unix_group_init (PolkitUnixGroup *unix_group) - { -+ unix_group->gid = -1; /* (git_t) -1 is not a valid GID under Linux */ - } - - static void -@@ -100,11 +101,14 @@ polkit_unix_group_set_property (GObject *object, - GParamSpec *pspec) - { - PolkitUnixGroup *unix_group = POLKIT_UNIX_GROUP (object); -+ gint val; - - switch (prop_id) - { - case PROP_GID: -- unix_group->gid = g_value_get_int (value); -+ val = g_value_get_int (value); -+ g_return_if_fail (val != -1); -+ unix_group->gid = val; - break; - - default: -@@ -131,9 +135,9 @@ polkit_unix_group_class_init (PolkitUnixGroupClass *klass) - g_param_spec_int ("gid", - "Group ID", - "The UNIX group ID", -- 0, -+ G_MININT, - G_MAXINT, -- 0, -+ -1, - G_PARAM_CONSTRUCT | - G_PARAM_READWRITE | - G_PARAM_STATIC_NAME | -@@ -166,9 +170,10 @@ polkit_unix_group_get_gid (PolkitUnixGroup *group) - */ - void - polkit_unix_group_set_gid (PolkitUnixGroup *group, -- gint gid) -+ gint gid) - { - g_return_if_fail (POLKIT_IS_UNIX_GROUP (group)); -+ g_return_if_fail (gid != -1); - group->gid = gid; - } - -@@ -183,6 +188,8 @@ polkit_unix_group_set_gid (PolkitUnixGroup *group, - PolkitIdentity * - polkit_unix_group_new (gint gid) - { -+ g_return_val_if_fail (gid != -1, NULL); -+ - return POLKIT_IDENTITY (g_object_new (POLKIT_TYPE_UNIX_GROUP, - "gid", gid, - NULL)); -diff --git a/src/polkit/polkitunixprocess.c b/src/polkit/polkitunixprocess.c -index 972b777..b02b258 100644 ---- a/src/polkit/polkitunixprocess.c -+++ b/src/polkit/polkitunixprocess.c -@@ -159,9 +159,14 @@ polkit_unix_process_set_property (GObject *object, - polkit_unix_process_set_pid (unix_process, g_value_get_int (value)); - break; - -- case PROP_UID: -- polkit_unix_process_set_uid (unix_process, g_value_get_int (value)); -+ case PROP_UID: { -+ gint val; -+ -+ val = g_value_get_int (value); -+ g_return_if_fail (val != -1); -+ polkit_unix_process_set_uid (unix_process, val); - break; -+ } - - case PROP_START_TIME: - polkit_unix_process_set_start_time (unix_process, g_value_get_uint64 (value)); -@@ -239,7 +244,7 @@ polkit_unix_process_class_init (PolkitUnixProcessClass *klass) - g_param_spec_int ("uid", - "User ID", - "The UNIX user ID", -- -1, -+ G_MININT, - G_MAXINT, - -1, - G_PARAM_CONSTRUCT | -@@ -303,7 +308,6 @@ polkit_unix_process_set_uid (PolkitUnixProcess *process, - gint uid) - { - g_return_if_fail (POLKIT_IS_UNIX_PROCESS (process)); -- g_return_if_fail (uid >= -1); - process->uid = uid; - } - -diff --git a/src/polkit/polkitunixuser.c b/src/polkit/polkitunixuser.c -index 8bfd3a1..234a697 100644 ---- a/src/polkit/polkitunixuser.c -+++ b/src/polkit/polkitunixuser.c -@@ -72,6 +72,7 @@ G_DEFINE_TYPE_WITH_CODE (PolkitUnixUser, polkit_unix_user, G_TYPE_OBJECT, - static void - polkit_unix_user_init (PolkitUnixUser *unix_user) - { -+ unix_user->uid = -1; /* (uid_t) -1 is not a valid UID under Linux */ - unix_user->name = NULL; - } - -@@ -112,11 +113,14 @@ polkit_unix_user_set_property (GObject *object, - GParamSpec *pspec) - { - PolkitUnixUser *unix_user = POLKIT_UNIX_USER (object); -+ gint val; - - switch (prop_id) - { - case PROP_UID: -- unix_user->uid = g_value_get_int (value); -+ val = g_value_get_int (value); -+ g_return_if_fail (val != -1); -+ unix_user->uid = val; - break; - - default: -@@ -144,9 +148,9 @@ polkit_unix_user_class_init (PolkitUnixUserClass *klass) - g_param_spec_int ("uid", - "User ID", - "The UNIX user ID", -- 0, -+ G_MININT, - G_MAXINT, -- 0, -+ -1, - G_PARAM_CONSTRUCT | - G_PARAM_READWRITE | - G_PARAM_STATIC_NAME | -@@ -182,6 +186,7 @@ polkit_unix_user_set_uid (PolkitUnixUser *user, - gint uid) - { - g_return_if_fail (POLKIT_IS_UNIX_USER (user)); -+ g_return_if_fail (uid != -1); - user->uid = uid; - } - -@@ -196,6 +201,8 @@ polkit_unix_user_set_uid (PolkitUnixUser *user, - PolkitIdentity * - polkit_unix_user_new (gint uid) - { -+ g_return_val_if_fail (uid != -1, NULL); -+ - return POLKIT_IDENTITY (g_object_new (POLKIT_TYPE_UNIX_USER, - "uid", uid, - NULL)); --- -2.22.0.vfs.1.1.57.gbaf16c8 diff --git a/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/CVE-2018-19788_p2.patch b/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/CVE-2018-19788_p2.patch deleted file mode 100644 index 097dfd92..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/CVE-2018-19788_p2.patch +++ /dev/null @@ -1,153 +0,0 @@ -From 17f18d9f81d99b014c680e7e50198d7f190b804e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> -Date: Mon, 3 Dec 2018 11:20:34 +0100 -Subject: [PATCH 2/3] tests: add tests for high uids - -CVE: CVE-2018-19788 -Upstream-Status: Backport -[https://gitlab.freedesktop.org/polkit/polkit/commit/b534a10727455409acd54018a9c91000e7626126] - -Signed-off-by: Dan Tran <dantran@microsoft.com> ---- - test/data/etc/group | 1 + - test/data/etc/passwd | 2 + - .../etc/polkit-1/rules.d/10-testing.rules | 21 ++++++ - .../test-polkitbackendjsauthority.c | 72 +++++++++++++++++++ - 4 files changed, 96 insertions(+) - -diff --git a/test/data/etc/group b/test/data/etc/group -index 12ef328..b9acab9 100644 ---- a/test/data/etc/group -+++ b/test/data/etc/group -@@ -5,3 +5,4 @@ john:x:500: - jane:x:501: - sally:x:502: - henry:x:503: -+highuid2:x:4000000000: -diff --git a/test/data/etc/passwd b/test/data/etc/passwd -index 8544feb..5cf14a5 100644 ---- a/test/data/etc/passwd -+++ b/test/data/etc/passwd -@@ -3,3 +3,5 @@ john:x:500:500:John Done:/home/john:/bin/bash - jane:x:501:501:Jane Smith:/home/jane:/bin/bash - sally:x:502:502:Sally Derp:/home/sally:/bin/bash - henry:x:503:503:Henry Herp:/home/henry:/bin/bash -+highuid1:x:2147483648:2147483648:The first high uid:/home/highuid1:/sbin/nologin -+highuid2:x:4000000000:4000000000:An example high uid:/home/example:/sbin/nologin -diff --git a/test/data/etc/polkit-1/rules.d/10-testing.rules b/test/data/etc/polkit-1/rules.d/10-testing.rules -index 446e622..98bf062 100644 ---- a/test/data/etc/polkit-1/rules.d/10-testing.rules -+++ b/test/data/etc/polkit-1/rules.d/10-testing.rules -@@ -53,6 +53,27 @@ polkit.addRule(function(action, subject) { - } - }); - -+polkit.addRule(function(action, subject) { -+ if (action.id == "net.company.john_action") { -+ if (subject.user == "john") { -+ return polkit.Result.YES; -+ } else { -+ return polkit.Result.NO; -+ } -+ } -+}); -+ -+polkit.addRule(function(action, subject) { -+ if (action.id == "net.company.highuid2_action") { -+ if (subject.user == "highuid2") { -+ return polkit.Result.YES; -+ } else { -+ return polkit.Result.NO; -+ } -+ } -+}); -+ -+ - // --------------------------------------------------------------------- - // variables - -diff --git a/test/polkitbackend/test-polkitbackendjsauthority.c b/test/polkitbackend/test-polkitbackendjsauthority.c -index b484a26..71aad23 100644 ---- a/test/polkitbackend/test-polkitbackendjsauthority.c -+++ b/test/polkitbackend/test-polkitbackendjsauthority.c -@@ -330,6 +330,78 @@ static const RulesTestCase rules_test_cases[] = { - NULL, - POLKIT_IMPLICIT_AUTHORIZATION_AUTHORIZED, - }, -+ -+ { -+ /* highuid1 is not a member of group 'users', see test/data/etc/group */ -+ "group_membership_with_non_member(highuid22)", -+ "net.company.group.only_group_users", -+ "unix-user:highuid2", -+ NULL, -+ POLKIT_IMPLICIT_AUTHORIZATION_NOT_AUTHORIZED, -+ }, -+ -+ { -+ /* highuid2 is not a member of group 'users', see test/data/etc/group */ -+ "group_membership_with_non_member(highuid21)", -+ "net.company.group.only_group_users", -+ "unix-user:highuid2", -+ NULL, -+ POLKIT_IMPLICIT_AUTHORIZATION_NOT_AUTHORIZED, -+ }, -+ -+ { -+ /* highuid1 is not a member of group 'users', see test/data/etc/group */ -+ "group_membership_with_non_member(highuid24)", -+ "net.company.group.only_group_users", -+ "unix-user:2147483648", -+ NULL, -+ POLKIT_IMPLICIT_AUTHORIZATION_NOT_AUTHORIZED, -+ }, -+ -+ { -+ /* highuid2 is not a member of group 'users', see test/data/etc/group */ -+ "group_membership_with_non_member(highuid23)", -+ "net.company.group.only_group_users", -+ "unix-user:4000000000", -+ NULL, -+ POLKIT_IMPLICIT_AUTHORIZATION_NOT_AUTHORIZED, -+ }, -+ -+ { -+ /* john is authorized to do this, see 10-testing.rules */ -+ "john_action", -+ "net.company.john_action", -+ "unix-user:john", -+ NULL, -+ POLKIT_IMPLICIT_AUTHORIZATION_AUTHORIZED, -+ }, -+ -+ { -+ /* only john is authorized to do this, see 10-testing.rules */ -+ "jane_action", -+ "net.company.john_action", -+ "unix-user:jane", -+ NULL, -+ POLKIT_IMPLICIT_AUTHORIZATION_NOT_AUTHORIZED, -+ }, -+ -+ { -+ /* highuid2 is authorized to do this, see 10-testing.rules */ -+ "highuid2_action", -+ "net.company.highuid2_action", -+ "unix-user:highuid2", -+ NULL, -+ POLKIT_IMPLICIT_AUTHORIZATION_AUTHORIZED, -+ }, -+ -+ { -+ /* only highuid2 is authorized to do this, see 10-testing.rules */ -+ "highuid1_action", -+ "net.company.highuid2_action", -+ "unix-user:highuid1", -+ NULL, -+ POLKIT_IMPLICIT_AUTHORIZATION_NOT_AUTHORIZED, -+ }, - }; - - /* ---------------------------------------------------------------------------------------------------- */ --- -2.22.0.vfs.1.1.57.gbaf16c8 diff --git a/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/CVE-2018-19788_p3.patch b/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/CVE-2018-19788_p3.patch deleted file mode 100644 index b97a6b06..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/CVE-2018-19788_p3.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 0fd5884a943a92aa076fa3276bd83f502dcb934e Mon Sep 17 00:00:00 2001 -From: Matthew Leeds <matthew.leeds@endlessm.com> -Date: Tue, 11 Dec 2018 12:04:26 -0800 -Subject: [PATCH 3/3] Allow uid of -1 for a PolkitUnixProcess - -Commit 2cb40c4d5 changed PolkitUnixUser, PolkitUnixGroup, and -PolkitUnixProcess to allow negative values for their uid/gid properties, -since these are values above INT_MAX which wrap around but are still -valid, with the exception of -1 which is not valid. However, -PolkitUnixProcess allows a uid of -1 to be passed to -polkit_unix_process_new_for_owner() which means polkit is expected to -figure out the uid on its own (this happens in the _constructed -function). So this commit removes the check in -polkit_unix_process_set_property() so that new_for_owner() can be used -as documented without producing a critical error message. - -This does not affect the protection against CVE-2018-19788 which is -based on creating a user with a UID up to but not including 4294967295 -(-1). - -CVE: CVE-2018-19788 -Upstream-Status: Backport -[https://gitlab.freedesktop.org/polkit/polkit/commit/c05472b86222a72505adc5eec460493980224ef8] - -Signed-off-by: Dan Tran <dantran@microsoft.com> ---- - src/polkit/polkitunixprocess.c | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) - -diff --git a/src/polkit/polkitunixprocess.c b/src/polkit/polkitunixprocess.c -index b02b258..e2a3c03 100644 ---- a/src/polkit/polkitunixprocess.c -+++ b/src/polkit/polkitunixprocess.c -@@ -159,14 +159,9 @@ polkit_unix_process_set_property (GObject *object, - polkit_unix_process_set_pid (unix_process, g_value_get_int (value)); - break; - -- case PROP_UID: { -- gint val; -- -- val = g_value_get_int (value); -- g_return_if_fail (val != -1); -- polkit_unix_process_set_uid (unix_process, val); -+ case PROP_UID: -+ polkit_unix_process_set_uid (unix_process, g_value_get_int (value)); - break; -- } - - case PROP_START_TIME: - polkit_unix_process_set_start_time (unix_process, g_value_get_uint64 (value)); --- -2.22.0.vfs.1.1.57.gbaf16c8 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/CVE-2019-6133.patch b/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/CVE-2019-6133.patch deleted file mode 100644 index 6fd20dc7..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/CVE-2019-6133.patch +++ /dev/null @@ -1,190 +0,0 @@ -From 6cc6aafee135ba44ea748250d7d29b562ca190e3 Mon Sep 17 00:00:00 2001 -From: Colin Walters <walters@verbum.org> -Date: Fri, 4 Jan 2019 14:24:48 -0500 -Subject: [PATCH] backend: Compare PolkitUnixProcess uids for temporary - authorizations - -It turns out that the combination of `(pid, start time)` is not -enough to be unique. For temporary authorizations, we can avoid -separate users racing on pid reuse by simply comparing the uid. - -https://bugs.chromium.org/p/project-zero/issues/detail?id=1692 - -And the above original email report is included in full in a new comment. - -Reported-by: Jann Horn <jannh@google.com> - -Closes: https://gitlab.freedesktop.org/polkit/polkit/issues/75 - -CVE: CVE-2019-6133 -Upstream-Status: Backport [https://gitlab.freedesktop.org/polkit/polkit.git] - -Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> ---- - src/polkit/polkitsubject.c | 2 + - src/polkit/polkitunixprocess.c | 71 ++++++++++++++++++- - .../polkitbackendinteractiveauthority.c | 39 +++++++++- - 3 files changed, 110 insertions(+), 2 deletions(-) - -diff --git a/src/polkit/polkitsubject.c b/src/polkit/polkitsubject.c -index d4c1182..ccabd0a 100644 ---- a/src/polkit/polkitsubject.c -+++ b/src/polkit/polkitsubject.c -@@ -99,6 +99,8 @@ polkit_subject_hash (PolkitSubject *subject) - * @b: A #PolkitSubject. - * - * Checks if @a and @b are equal, ie. represent the same subject. -+ * However, avoid calling polkit_subject_equal() to compare two processes; -+ * for more information see the `PolkitUnixProcess` documentation. - * - * This function can be used in e.g. g_hash_table_new(). - * -diff --git a/src/polkit/polkitunixprocess.c b/src/polkit/polkitunixprocess.c -index b02b258..78d7251 100644 ---- a/src/polkit/polkitunixprocess.c -+++ b/src/polkit/polkitunixprocess.c -@@ -51,7 +51,10 @@ - * @title: PolkitUnixProcess - * @short_description: Unix processs - * -- * An object for representing a UNIX process. -+ * An object for representing a UNIX process. NOTE: This object as -+ * designed is now known broken; a mechanism to exploit a delay in -+ * start time in the Linux kernel was identified. Avoid -+ * calling polkit_subject_equal() to compare two processes. - * - * To uniquely identify processes, both the process id and the start - * time of the process (a monotonic increasing value representing the -@@ -66,6 +69,72 @@ - * polkit_unix_process_new_for_owner() with trusted data. - */ - -+/* See https://gitlab.freedesktop.org/polkit/polkit/issues/75 -+ -+ But quoting the original email in full here to ensure it's preserved: -+ -+ From: Jann Horn <jannh@google.com> -+ Subject: [SECURITY] polkit: temporary auth hijacking via PID reuse and non-atomic fork -+ Date: Wednesday, October 10, 2018 5:34 PM -+ -+When a (non-root) user attempts to e.g. control systemd units in the system -+instance from an active session over DBus, the access is gated by a polkit -+policy that requires "auth_admin_keep" auth. This results in an auth prompt -+being shown to the user, asking the user to confirm the action by entering the -+password of an administrator account. -+ -+After the action has been confirmed, the auth decision for "auth_admin_keep" is -+cached for up to five minutes. Subject to some restrictions, similar actions can -+then be performed in this timespan without requiring re-auth: -+ -+ - The PID of the DBus client requesting the new action must match the PID of -+ the DBus client requesting the old action (based on SO_PEERCRED information -+ forwarded by the DBus daemon). -+ - The "start time" of the client's PID (as seen in /proc/$pid/stat, field 22) -+ must not have changed. The granularity of this timestamp is in the -+ millisecond range. -+ - polkit polls every two seconds whether a process with the expected start time -+ still exists. If not, the temporary auth entry is purged. -+ -+Without the start time check, this would obviously be buggy because an attacker -+could simply wait for the legitimate client to disappear, then create a new -+client with the same PID. -+ -+Unfortunately, the start time check is bypassable because fork() is not atomic. -+Looking at the source code of copy_process() in the kernel: -+ -+ p->start_time = ktime_get_ns(); -+ p->real_start_time = ktime_get_boot_ns(); -+ [...] -+ retval = copy_thread_tls(clone_flags, stack_start, stack_size, p, tls); -+ if (retval) -+ goto bad_fork_cleanup_io; -+ -+ if (pid != &init_struct_pid) { -+ pid = alloc_pid(p->nsproxy->pid_ns_for_children); -+ if (IS_ERR(pid)) { -+ retval = PTR_ERR(pid); -+ goto bad_fork_cleanup_thread; -+ } -+ } -+ -+The ktime_get_boot_ns() call is where the "start time" of the process is -+recorded. The alloc_pid() call is where a free PID is allocated. In between -+these, some time passes; and because the copy_thread_tls() call between them can -+access userspace memory when sys_clone() is invoked through the 32-bit syscall -+entry point, an attacker can even stall the kernel arbitrarily long at this -+point (by supplying a pointer into userspace memory that is associated with a -+userfaultfd or is backed by a custom FUSE filesystem). -+ -+This means that an attacker can immediately call sys_clone() when the victim -+process is created, often resulting in a process that has the exact same start -+time reported in procfs; and then the attacker can delay the alloc_pid() call -+until after the victim process has died and the PID assignment has cycled -+around. This results in an attacker process that polkit can't distinguish from -+the victim process. -+*/ -+ -+ - /** - * PolkitUnixProcess: - * -diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c -index a1630b9..80e8141 100644 ---- a/src/polkitbackend/polkitbackendinteractiveauthority.c -+++ b/src/polkitbackend/polkitbackendinteractiveauthority.c -@@ -3031,6 +3031,43 @@ temporary_authorization_store_free (TemporaryAuthorizationStore *store) - g_free (store); - } - -+/* See the comment at the top of polkitunixprocess.c */ -+static gboolean -+subject_equal_for_authz (PolkitSubject *a, -+ PolkitSubject *b) -+{ -+ if (!polkit_subject_equal (a, b)) -+ return FALSE; -+ -+ /* Now special case unix processes, as we want to protect against -+ * pid reuse by including the UID. -+ */ -+ if (POLKIT_IS_UNIX_PROCESS (a) && POLKIT_IS_UNIX_PROCESS (b)) { -+ PolkitUnixProcess *ap = (PolkitUnixProcess*)a; -+ int uid_a = polkit_unix_process_get_uid ((PolkitUnixProcess*)a); -+ PolkitUnixProcess *bp = (PolkitUnixProcess*)b; -+ int uid_b = polkit_unix_process_get_uid ((PolkitUnixProcess*)b); -+ -+ if (uid_a != -1 && uid_b != -1) -+ { -+ if (uid_a == uid_b) -+ { -+ return TRUE; -+ } -+ else -+ { -+ g_printerr ("denying slowfork; pid %d uid %d != %d!\n", -+ polkit_unix_process_get_pid (ap), -+ uid_a, uid_b); -+ return FALSE; -+ } -+ } -+ /* Fall through; one of the uids is unset so we can't reliably compare */ -+ } -+ -+ return TRUE; -+} -+ - static gboolean - temporary_authorization_store_has_authorization (TemporaryAuthorizationStore *store, - PolkitSubject *subject, -@@ -3073,7 +3110,7 @@ temporary_authorization_store_has_authorization (TemporaryAuthorizationStore *st - TemporaryAuthorization *authorization = l->data; - - if (strcmp (action_id, authorization->action_id) == 0 && -- polkit_subject_equal (subject_to_use, authorization->subject)) -+ subject_equal_for_authz (subject_to_use, authorization->subject)) - { - ret = TRUE; - if (out_tmp_authz_id != NULL) --- -2.20.1 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_0.115.bb b/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_0.116.bb index 1587cc0e..ad1973b1 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_0.115.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_0.116.bb @@ -7,7 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \ DEPENDS = "expat glib-2.0 intltool-native mozjs" -inherit autotools gtk-doc pkgconfig useradd systemd gobject-introspection +inherit autotools gtk-doc pkgconfig useradd systemd gobject-introspection features_check + +REQUIRED_DISTRO_FEATURES = "polkit" PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', \ @@ -21,15 +23,11 @@ PACKAGECONFIG[consolekit] = ",,,consolekit" PAM_SRC_URI = "file://polkit-1_pam.patch" SRC_URI = "http://www.freedesktop.org/software/polkit/releases/polkit-${PV}.tar.gz \ - file://0001-make-netgroup-support-configurable.patch \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ - file://CVE-2019-6133.patch \ - file://CVE-2018-19788_p1.patch \ - file://CVE-2018-19788_p2.patch \ - file://CVE-2018-19788_p3.patch \ -" -SRC_URI[md5sum] = "f03b055d6ae5fc8eac76838c7d83d082" -SRC_URI[sha256sum] = "2f87ecdabfbd415c6306673ceadc59846f059b18ef2fce42bac63fe283f12131" + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ + file://0003-make-netgroup-support-optional.patch \ + " +SRC_URI[md5sum] = "4b37258583393e83069a0e2e89c0162a" +SRC_URI[sha256sum] = "88170c9e711e8db305a12fdb8234fac5706c61969b94e084d0f117d8ec5d34b1" EXTRA_OECONF = "--with-os-type=moblin \ --disable-man-pages \ diff --git a/external/meta-openembedded/meta-oe/recipes-extended/redis/redis/0001-src-Do-not-reset-FINAL_LIBS.patch b/external/meta-openembedded/meta-oe/recipes-extended/redis/redis/0001-src-Do-not-reset-FINAL_LIBS.patch new file mode 100644 index 00000000..b5c4133e --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/redis/redis/0001-src-Do-not-reset-FINAL_LIBS.patch @@ -0,0 +1,32 @@ +From 97584e1eb78dc18599534b47b6670c20c63f5ee2 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 10 Sep 2019 20:04:26 -0700 +Subject: [PATCH] src: Do not reset FINAL_LIBS + +This helps case where additional libraries are needed to be passed from +environment to get it going + +e.g. -latomic is needed on clang/x86 to provide for 64bit atomics + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index 7f7c625..c71dd3b 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -75,7 +75,7 @@ endif + + FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) + FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) +-FINAL_LIBS=-lm ++FINAL_LIBS+=-lm + DEBUG=-g -ggdb + + # Linux ARM needs -latomic at linking time +-- +2.23.0 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch b/external/meta-openembedded/meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch new file mode 100644 index 00000000..9a40d832 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch @@ -0,0 +1,19 @@ +Define _GNU_SOURCE to get PTHREAD_MUTEX_INITIALIZER + +Fixes +| zmalloc.c:87:37: error: 'PTHREAD_MUTEX_DEFAULT' undeclared here (not in a function) +| 87 | pthread_mutex_t used_memory_mutex = PTHREAD_MUTEX_INITIALIZER; +| | ^~~~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/src/zmalloc.c ++++ b/src/zmalloc.c +@@ -28,6 +28,7 @@ + * POSSIBILITY OF SUCH DAMAGE. + */ + ++#define _GNU_SOURCE + #include <stdio.h> + #include <stdlib.h> + #include <stdint.h> diff --git a/external/meta-openembedded/meta-oe/recipes-extended/redis/redis/remove-atomics.patch b/external/meta-openembedded/meta-oe/recipes-extended/redis/redis/remove-atomics.patch deleted file mode 100644 index 23b2f2aa..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/redis/redis/remove-atomics.patch +++ /dev/null @@ -1,72 +0,0 @@ -From c486455e0691f9915018b9d8b133200a6c61a3c5 Mon Sep 17 00:00:00 2001 -From: Alistair Francis <alistair.francis@wdc.com> -Date: Thu, 24 May 2018 09:58:42 -0700 -Subject: [PATCH] Remove atomics - -Based on this patch: -https://github.com/patrikx3/lede-redis/blob/master/redis/patches/010-redis.patch - -Signed-off-by: Alistair Francis <alistair.francis@wdc.com> ---- - deps/jemalloc/src/pages.c | 22 +--------------------- - src/atomicvar.h | 4 ++-- - 2 files changed, 3 insertions(+), 23 deletions(-) - -diff --git a/deps/jemalloc/src/pages.c b/deps/jemalloc/src/pages.c -index 83a167f6..8e82c78d 100644 ---- a/deps/jemalloc/src/pages.c -+++ b/deps/jemalloc/src/pages.c -@@ -147,27 +147,7 @@ pages_purge(void *addr, size_t size) - { - bool unzeroed; - --#ifdef _WIN32 -- VirtualAlloc(addr, size, MEM_RESET, PAGE_READWRITE); -- unzeroed = true; --#elif defined(JEMALLOC_HAVE_MADVISE) --# ifdef JEMALLOC_PURGE_MADVISE_DONTNEED --# define JEMALLOC_MADV_PURGE MADV_DONTNEED --# define JEMALLOC_MADV_ZEROS true --# elif defined(JEMALLOC_PURGE_MADVISE_FREE) --# define JEMALLOC_MADV_PURGE MADV_FREE --# define JEMALLOC_MADV_ZEROS false --# else --# error "No madvise(2) flag defined for purging unused dirty pages." --# endif -- int err = madvise(addr, size, JEMALLOC_MADV_PURGE); -- unzeroed = (!JEMALLOC_MADV_ZEROS || err != 0); --# undef JEMALLOC_MADV_PURGE --# undef JEMALLOC_MADV_ZEROS --#else -- /* Last resort no-op. */ -- unzeroed = true; --#endif -+ unzeroed = false; - return (unzeroed); - } - -diff --git a/src/atomicvar.h b/src/atomicvar.h -index 84a5bbc5..f9b563c2 100644 ---- a/src/atomicvar.h -+++ b/src/atomicvar.h -@@ -68,7 +68,7 @@ - * is reported. */ - // #define __ATOMIC_VAR_FORCE_SYNC_MACROS - --#if !defined(__ATOMIC_VAR_FORCE_SYNC_MACROS) && defined(__ATOMIC_RELAXED) && !defined(__sun) && (!defined(__clang__) || !defined(__APPLE__) || __apple_build_version__ > 4210057) -+#if defined(CONFIG_EDAC_ATOMIC_SCRUB) && !defined(__ATOMIC_VAR_FORCE_SYNC_MACROS) && defined(__ATOMIC_RELAXED) && !defined(__sun) && (!defined(__clang__) || !defined(__APPLE__) || __apple_build_version__ > 4210057) - /* Implementation using __atomic macros. */ - - #define atomicIncr(var,count) __atomic_add_fetch(&var,(count),__ATOMIC_RELAXED) -@@ -82,7 +82,7 @@ - #define atomicSet(var,value) __atomic_store_n(&var,value,__ATOMIC_RELAXED) - #define REDIS_ATOMIC_API "atomic-builtin" - --#elif defined(HAVE_ATOMIC) -+#elif defined(CONFIG_EDAC_ATOMIC_SCRUB) && defined(HAVE_ATOMIC) - /* Implementation using __sync macros. */ - - #define atomicIncr(var,count) __sync_add_and_fetch(&var,(count)) --- -2.17.0 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/redis/redis_4.0.8.bb b/external/meta-openembedded/meta-oe/recipes-extended/redis/redis_5.0.9.bb index 80d36d2b..d0429336 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/redis/redis_4.0.8.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/redis/redis_5.0.9.bb @@ -2,34 +2,43 @@ SUMMARY = "Redis key-value store" DESCRIPTION = "Redis is an open source, advanced key-value store." HOMEPAGE = "http://redis.io" SECTION = "libs" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=3c01b49fed4df1a79843688fa3f7b9d6" -DEPENDS = "" +DEPENDS = "readline lua ncurses" SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \ - file://hiredis-use-default-CC-if-it-is-set.patch \ - file://lua-update-Makefile-to-use-environment-build-setting.patch \ - file://oe-use-libc-malloc.patch \ file://redis.conf \ file://init-redis-server \ file://redis.service \ -" - -SRC_URI_append_mips = " file://remove-atomics.patch" -SRC_URI_append_arm = " file://remove-atomics.patch" + file://hiredis-use-default-CC-if-it-is-set.patch \ + file://lua-update-Makefile-to-use-environment-build-setting.patch \ + file://oe-use-libc-malloc.patch \ + file://0001-src-Do-not-reset-FINAL_LIBS.patch \ + file://GNU_SOURCE.patch \ + " -SRC_URI[md5sum] = "c75b11e4177e153e4dc1d8dd3a6174e4" -SRC_URI[sha256sum] = "ff0c38b8c156319249fec61e5018cf5b5fe63a65b61690bec798f4c998c232ad" +SRC_URI[md5sum] = "c94523c9f4ee662027ddf90575d0e058" +SRC_URI[sha256sum] = "53d0ae164cd33536c3d4b720ae9a128ea6166ebf04ff1add3b85f1242090cb85" inherit autotools-brokensep update-rc.d systemd useradd +FINAL_LIBS_x86_toolchain-clang = "-latomic" +FINAL_LIBS_mips = "-latomic" +FINAL_LIBS_arm = "-latomic" +FINAL_LIBS_powerpc = "-latomic" + +export FINAL_LIBS + USERADD_PACKAGES = "${PN}" USERADD_PARAM_${PN} = "--system --home-dir /var/lib/redis -g redis --shell /bin/false redis" GROUPADD_PARAM_${PN} = "--system redis" - REDIS_ON_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" +do_compile_prepend() { + (cd deps && oe_runmake hiredis lua linenoise) +} + do_install() { export PREFIX=${D}/${prefix} oe_runmake install diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rrdtool/rrdtool_1.7.0.bb b/external/meta-openembedded/meta-oe/recipes-extended/rrdtool/rrdtool_1.7.2.bb index ff995748..5662e634 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/rrdtool/rrdtool_1.7.0.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/rrdtool/rrdtool_1.7.2.bb @@ -2,12 +2,12 @@ SUMMARY = "High performance data logging and graphing system for time series dat HOMEPAGE = "http://oss.oetiker.ch/rrdtool/" LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=3349111ed0533471494beec99715bc9d" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=39df84cfd8a5e18bf988f277f7946676" -DEPENDS = "libpng zlib cairo pango glib-2.0 libxml2 groff-native python-setuptools-native" +DEPENDS = "libpng zlib cairo pango glib-2.0 libxml2 groff-native python3-setuptools-native" -SRCREV = "bfc82d5242855628b826018479df00e0ec4e8360" -PV = "1.7.0" +SRCREV = "56a83f4f52e6745cd4352f9ee008be3183a6dedf" +PV = "1.7.2" SRC_URI = "\ git://github.com/oetiker/rrdtool-1.x.git;branch=master;protocol=http; \ @@ -15,7 +15,7 @@ SRC_URI = "\ S = "${WORKDIR}/git" -inherit cpan autotools-brokensep gettext pythonnative python-dir systemd +inherit cpan autotools-brokensep gettext python3native python3-dir systemd BBCLASSEXTEND = "native" @@ -24,7 +24,7 @@ SYSTEMD_SERVICE_rrdcached = "rrdcached.socket rrdcached.service" EXTRA_AUTORECONF = "-I m4 --exclude=autopoint" -PACKAGECONFIG ??= "python perl ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG ??= "perl ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" PACKAGECONFIG[python] = "--enable-python=yes \ am_cv_python_pythondir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages \ @@ -32,7 +32,7 @@ am_cv_python_pyexecdir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packag --disable-python,python," PACKAGECONFIG[perl] = \ -"--enable-perl=yes --with-perl-options='INSTALLDIRS="vendor"' \ +"--enable-perl=yes --with-perl-options='INSTALLDIRS="vendor" CCFLAGS="${CFLAGS}" NO_PACKLIST=1 NO_PERLLOCAL=1' \ ac_cv_path_PERL_CC='${CC}', \ --disable-perl,perl," @@ -50,6 +50,7 @@ EXTRA_OECONF = " \ --disable-tcl \ --disable-rpath \ --enable-nls=${USE_NLS} \ + --disable-docs \ " export STAGING_LIBDIR @@ -122,7 +123,7 @@ RDEPENDS_${PN}-perl = "perl perl-module-lib perl-module-getopt-long perl-module- DESCRIPTION_${PN}-python = \ "The ${PN}-python package includes RRDtool bindings for python." FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" -RDEPENDS_${PN}-python = "python" +RDEPENDS_${PN}-python = "python3" FILES_${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/RRDs/.debug \ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-fix-jump-misses-init-error.patch b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-fix-jump-misses-init-error.patch deleted file mode 100644 index 68b68634..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-fix-jump-misses-init-error.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 3e5a0cb440c788e2383e40ab23ac1cf01d96961b Mon Sep 17 00:00:00 2001 -From: Mingli Yu <mingli.yu@windriver.com> -Date: Tue, 24 Jul 2018 01:30:25 -0700 -Subject: [PATCH] src/tcp.c: fix jump-misses-init error - -Fix below jump-misses-init error - -| In file included from ../../git/src/tcp.c:51: -| ../../git/src/tcp.c: In function 'relpTcpConnect': -| ../../git/src/relp.h:220:3: error: jump skips variable initialization [-Werror=jump-misses-init] -| goto finalize_it; \ -| ^~~~ -| ../../git/src/tcp.c:1951:3: note: in expansion of macro 'ABORT_FINALIZE' -| ABORT_FINALIZE(RELP_RET_IO_ERR); -| ^~~~~~~~~~~~~~ -| ../../git/src/tcp.c:2005:1: note: label 'finalize_it' defined here -| finalize_it: -| ^~~~~~~~~~~ -| ../../git/src/tcp.c:1991:6: note: 'r' declared here -| int r = getsockopt(pThis->sock, SOL_SOCKET, SO_ERROR, &so_error, &len); -| ^ -| In file included from ../../git/src/tcp.c:51: -| ../../git/src/relp.h:220:3: error: jump skips variable initialization [-Werror=jump-misses-init] -| goto finalize_it; \ -| ^~~~ -| ../../git/src/tcp.c:1951:3: note: in expansion of macro 'ABORT_FINALIZE' -| ABORT_FINALIZE(RELP_RET_IO_ERR); -| ^~~~~~~~~~~~~~ -| ../../git/src/tcp.c:2005:1: note: label 'finalize_it' defined here -| finalize_it: -| ^~~~~~~~~~~ -| ../../git/src/tcp.c:1989:12: note: 'len' declared here -| socklen_t len = sizeof so_error; -| ^~~ - -Upstream-Status: Submitted[https://github.com/rsyslog/librelp/pull/117] - -Signed-off-by: Mingli Yu <mingli.yu@windriver.com> ---- - src/tcp.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/src/tcp.c b/src/tcp.c -index f35eb84..fb34dc7 100644 ---- a/src/tcp.c -+++ b/src/tcp.c -@@ -1936,6 +1936,9 @@ relpTcpConnect(relpTcp_t *const pThis, - struct addrinfo hints; - struct addrinfo *reslocal = NULL; - struct pollfd pfd; -+ int so_error; -+ socklen_t len = sizeof so_error; -+ int r; - - ENTER_RELPFUNC; - RELPOBJ_assert(pThis, Tcp); -@@ -1985,10 +1988,8 @@ relpTcpConnect(relpTcp_t *const pThis, - ABORT_FINALIZE(RELP_RET_TIMED_OUT); - } - -- int so_error; -- socklen_t len = sizeof so_error; - -- int r = getsockopt(pThis->sock, SOL_SOCKET, SO_ERROR, &so_error, &len); -+ r = getsockopt(pThis->sock, SOL_SOCKET, SO_ERROR, &so_error, &len); - if (r == -1 || so_error != 0) { - pThis->pEngine->dbgprint("socket has an error %d\n", so_error); - ABORT_FINALIZE(RELP_RET_IO_ERR); --- -2.17.1 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-increase-the-size-of-szHname.patch b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-increase-the-size-of-szHname.patch deleted file mode 100644 index 5a62e158..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-increase-the-size-of-szHname.patch +++ /dev/null @@ -1,53 +0,0 @@ -From d8950ad273d79ec516468289adbd427e681dbc66 Mon Sep 17 00:00:00 2001 -From: Mingli Yu <mingli.yu@windriver.com> -Date: Mon, 30 Jul 2018 01:22:56 -0700 -Subject: [PATCH] src/tcp.c: increase the size of szHname - -Increase the size of szHname to fix below -error: -| ../../git/src/tcp.c: In function 'relpTcpSetRemHost': -| ../../git/src/tcp.c:352:57: error: '%s' directive output may be truncated writing up to 1024 bytes into a region of size 1011 [-Werror=format-truncation=] -| snprintf((char*)szHname, NI_MAXHOST, "[MALICIOUS:IP=%s]", szIP); -| ^~ ~~~~ -| In file included from /poky-build/tmp/work/i586-poky-linux/librelp/1.2.16-r0/recipe-sysroot/usr/include/stdio.h:862, -| from ../../git/src/tcp.c:38: -| /poky-build/tmp/work/i586-poky-linux/librelp/1.2.16-r0/recipe-sysroot/usr/include/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk' output between 16 and 1040 bytes into a destination of size 1025 -| return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, -| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| __bos (__s), __fmt, __va_arg_pack ()); -| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| cc1: all warnings being treated as errors -| Makefile:536: recipe for target 'librelp_la-tcp.lo' failed - -Upstream-Status: Submitted[https://github.com/rsyslog/librelp/pull/118] - -Signed-off-by: Mingli Yu <mingli.yu@windriver.com> ---- - src/tcp.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/tcp.c b/src/tcp.c -index fb34dc7..2c38b0b 100644 ---- a/src/tcp.c -+++ b/src/tcp.c -@@ -319,7 +319,7 @@ relpTcpSetRemHost(relpTcp_t *const pThis, struct sockaddr *pAddr) - relpEngine_t *pEngine; - int error; - unsigned char szIP[NI_MAXHOST] = ""; -- unsigned char szHname[NI_MAXHOST] = ""; -+ unsigned char szHname[1045] = ""; - struct addrinfo hints, *res; - size_t len; - -@@ -349,7 +349,7 @@ relpTcpSetRemHost(relpTcp_t *const pThis, struct sockaddr *pAddr) - if(getaddrinfo((char*)szHname, NULL, &hints, &res) == 0) { - freeaddrinfo (res); - /* OK, we know we have evil, so let's indicate this to our caller */ -- snprintf((char*)szHname, NI_MAXHOST, "[MALICIOUS:IP=%s]", szIP); -+ snprintf((char*)szHname, sizeof(szHname), "[MALICIOUS:IP=%s]", szIP); - pEngine->dbgprint("Malicious PTR record, IP = \"%s\" HOST = \"%s\"", szIP, szHname); - iRet = RELP_RET_MALICIOUS_HNAME; - } --- -2.17.1 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.2.16.bb b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.2.16.bb deleted file mode 100644 index 17478efe..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.2.16.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "A reliable logging library" -HOMEPAGE = "https://github.com/rsyslog/libfastjson" - -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=1fb9c10ed9fd6826757615455ca893a9" - -DEPENDS = "gmp nettle libidn zlib gnutls" - -SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https \ - file://0001-src-tcp.c-fix-jump-misses-init-error.patch \ - file://0001-src-tcp.c-increase-the-size-of-szHname.patch \ -" - -SRCREV = "5e849ff060be0c7dce972e194c54fdacfee0adc2" - -S = "${WORKDIR}/git" - -inherit autotools pkgconfig diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.5.0.bb b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.5.0.bb new file mode 100644 index 00000000..a4663148 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.5.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "A reliable logging library" +HOMEPAGE = "https://github.com/rsyslog/librelp" + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=1fb9c10ed9fd6826757615455ca893a9" + +DEPENDS = "gmp nettle libidn zlib gnutls openssl" + +SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https \ +" + +SRCREV = "0beb2258e12e4131dc31e261078ea53d18f787d7" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +CPPFLAGS += "-Wno-error" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-fix-ptest-not-finish.patch b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-fix-ptest-not-finish.patch deleted file mode 100644 index a248f75e..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-fix-ptest-not-finish.patch +++ /dev/null @@ -1,118 +0,0 @@ -From 07ad2a1905089b9124623324a9969e4522317110 Mon Sep 17 00:00:00 2001 -From: Jackie Huang <jackie.huang@windriver.com> -Date: Fri, 12 Sep 2014 03:41:11 -0400 -Subject: [PATCH] rsyslog: update configure to fix ptest - -$MaxMessageSize doesn't work if before $IncludeConfig diag-common.conf, then -test cases fall into infinite loop with error message: - -8062.511110729:4902c480: error: message received is larger than max msg size, we split it -8062.511152265:4902c480: discarding zero-sized message - -Update configure to fix it. - -Upstream-Status: Pending - -Signed-off-by: Kai Kang <kai.kang@windriver.com> - ---- - tests/testsuites/complex1.conf | 2 +- - tests/testsuites/gzipwr_large.conf | 2 +- - tests/testsuites/gzipwr_large_dynfile.conf | 2 +- - tests/testsuites/imptcp_conndrop.conf | 2 +- - tests/testsuites/imptcp_large.conf | 2 +- - tests/testsuites/imtcp_conndrop.conf | 2 +- - tests/testsuites/wr_large.conf | 2 +- - 7 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/tests/testsuites/complex1.conf b/tests/testsuites/complex1.conf -index 9b6a9f3..e00caa4 100644 ---- a/tests/testsuites/complex1.conf -+++ b/tests/testsuites/complex1.conf -@@ -1,7 +1,7 @@ - # complex test case with multiple actions in gzip mode - # rgerhards, 2009-05-22 --$MaxMessageSize 10k - $IncludeConfig diag-common.conf -+$MaxMessageSize 10k - - $MainMsgQueueTimeoutEnqueue 5000 - -diff --git a/tests/testsuites/gzipwr_large.conf b/tests/testsuites/gzipwr_large.conf -index 54ad3bb..e8247a9 100644 ---- a/tests/testsuites/gzipwr_large.conf -+++ b/tests/testsuites/gzipwr_large.conf -@@ -1,7 +1,7 @@ - # simple async writing test - # rgerhards, 2010-03-09 --$MaxMessageSize 10k - $IncludeConfig diag-common.conf -+$MaxMessageSize 10k - - $ModLoad ../plugins/imtcp/.libs/imtcp - $MainMsgQueueTimeoutShutdown 10000 -diff --git a/tests/testsuites/gzipwr_large_dynfile.conf b/tests/testsuites/gzipwr_large_dynfile.conf -index 3a1b255..297cb70 100644 ---- a/tests/testsuites/gzipwr_large_dynfile.conf -+++ b/tests/testsuites/gzipwr_large_dynfile.conf -@@ -1,7 +1,7 @@ - # simple async writing test - # rgerhards, 2010-03-09 --$MaxMessageSize 10k - $IncludeConfig diag-common.conf -+$MaxMessageSize 10k - - $ModLoad ../plugins/imtcp/.libs/imtcp - $MainMsgQueueTimeoutShutdown 10000 -diff --git a/tests/testsuites/imptcp_conndrop.conf b/tests/testsuites/imptcp_conndrop.conf -index 77a5d79..d9a14a8 100644 ---- a/tests/testsuites/imptcp_conndrop.conf -+++ b/tests/testsuites/imptcp_conndrop.conf -@@ -1,7 +1,7 @@ - # simple async writing test - # rgerhards, 2010-03-09 --$MaxMessageSize 10k - $IncludeConfig diag-common.conf -+$MaxMessageSize 10k - - $ModLoad ../plugins/imptcp/.libs/imptcp - $MainMsgQueueTimeoutShutdown 10000 -diff --git a/tests/testsuites/imptcp_large.conf b/tests/testsuites/imptcp_large.conf -index 77a5d79..d9a14a8 100644 ---- a/tests/testsuites/imptcp_large.conf -+++ b/tests/testsuites/imptcp_large.conf -@@ -1,7 +1,7 @@ - # simple async writing test - # rgerhards, 2010-03-09 --$MaxMessageSize 10k - $IncludeConfig diag-common.conf -+$MaxMessageSize 10k - - $ModLoad ../plugins/imptcp/.libs/imptcp - $MainMsgQueueTimeoutShutdown 10000 -diff --git a/tests/testsuites/imtcp_conndrop.conf b/tests/testsuites/imtcp_conndrop.conf -index de41bc4..7844dc7 100644 ---- a/tests/testsuites/imtcp_conndrop.conf -+++ b/tests/testsuites/imtcp_conndrop.conf -@@ -1,7 +1,7 @@ - # simple async writing test - # rgerhards, 2010-03-09 --$MaxMessageSize 10k - $IncludeConfig diag-common.conf -+$MaxMessageSize 10k - - $ModLoad ../plugins/imtcp/.libs/imtcp - $MainMsgQueueTimeoutShutdown 10000 -diff --git a/tests/testsuites/wr_large.conf b/tests/testsuites/wr_large.conf -index b64f132..b0ae264 100644 ---- a/tests/testsuites/wr_large.conf -+++ b/tests/testsuites/wr_large.conf -@@ -1,7 +1,7 @@ - # simple async writing test - # rgerhards, 2010-03-09 --$MaxMessageSize 10k - $IncludeConfig diag-common.conf -+$MaxMessageSize 10k - - $ModLoad ../plugins/imtcp/.libs/imtcp - $MainMsgQueueTimeoutShutdown 10000 diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest index 3770a750..aa698d85 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest +++ b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest @@ -1,3 +1,8 @@ #!/bin/sh # +set -e +set -o pipefail + +SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" +cd ${SCRIPTPATH} make -C tests -k check-TESTS diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.37.0.bb b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.2002.0.bb index fbdf2818..ca8fddc7 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.37.0.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.2002.0.bb @@ -9,7 +9,7 @@ Rsyslog is an enhanced syslogd supporting, among others, MySQL,\ encryption protected syslog relay chains while at the same time being\ very easy to setup for the novice user." -DEPENDS = "zlib libestr libfastjson bison-native flex-native liblogging curl" +DEPENDS = "zlib libestr libfastjson bison-native flex-native liblogging" HOMEPAGE = "http://www.rsyslog.com/" LICENSE = "GPLv3 & LGPLv3 & Apache-2.0" LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973 \ @@ -23,15 +23,14 @@ SRC_URI = "http://www.rsyslog.com/download/files/download/rsyslog/${BPN}-${PV}.t file://rsyslog.logrotate \ file://use-pkgconfig-to-check-libgcrypt.patch \ file://run-ptest \ - file://rsyslog-fix-ptest-not-finish.patch \ " SRC_URI_append_libc-musl = " \ file://0001-Include-sys-time-h.patch \ " -SRC_URI[md5sum] = "e0942b4b88a13602a6b6352bf9f05091" -SRC_URI[sha256sum] = "295c289b4c8abd8f8f3fe35a83249b739cedabe82721702b910255f9faf147e7" +SRC_URI[md5sum] = "fbe6d18205170e22bad470954d0dc874" +SRC_URI[sha256sum] = "fe86c14d860da1202c76616feac0539ea5a40a4ad182d74b7d6d2419cc2381f8" UPSTREAM_CHECK_URI = "https://github.com/rsyslog/rsyslog/releases" UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" @@ -39,11 +38,15 @@ UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" inherit autotools pkgconfig systemd update-rc.d ptest EXTRA_OECONF += "--disable-generate-man-pages ap_cv_atomic_builtins=yes" +EXTRA_OECONF += "--enable-imfile-tests" +EXTRA_OECONF_remove_mipsarch = "ap_cv_atomic_builtins=yes" +EXTRA_OECONF_remove_powerpc = "ap_cv_atomic_builtins=yes" +EXTRA_OECONF_remove_riscv32 = "ap_cv_atomic_builtins=yes" # first line is default yes in configure PACKAGECONFIG ??= " \ rsyslogd rsyslogrt klog inet regexp uuid libgcrypt \ - imdiag gnutls imfile \ + fmhttp imdiag gnutls imfile \ ${@bb.utils.filter('DISTRO_FEATURES', 'snmp systemd', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'testbench relp ${VALGRIND}', '', d)} \ " @@ -52,6 +55,7 @@ PACKAGECONFIG ??= " \ PACKAGECONFIG[relp] = "--enable-relp,--disable-relp,librelp," PACKAGECONFIG[rsyslogd] = "--enable-rsyslogd,--disable-rsyslogd,," PACKAGECONFIG[rsyslogrt] = "--enable-rsyslogrt,--disable-rsyslogrt,," +PACKAGECONFIG[fmhttp] = "--enable-fmhttp,--disable-fmhttp,curl," PACKAGECONFIG[inet] = "--enable-inet,--disable-inet,," PACKAGECONFIG[klog] = "--enable-klog,--disable-klog,," PACKAGECONFIG[regexp] = "--enable-regexp,--disable-regexp,," @@ -67,12 +71,19 @@ PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp," PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls," PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd," PACKAGECONFIG[imjournal] = "--enable-imjournal,--disable-imjournal," +PACKAGECONFIG[mmjsonparse] = "--enable-mmjsonparse,--disable-mmjsonparse," PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5," PACKAGECONFIG[postgresql] = "--enable-pgsql,--disable-pgsql,postgresql," PACKAGECONFIG[libdbi] = "--enable-libdbi,--disable-libdbi,libdbi," PACKAGECONFIG[mail] = "--enable-mail,--disable-mail,," PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind," +do_configure_prepend() { + sed -i -e 's|python |python3 |g' ${S}/tests/*.sh + sed -i -e 's|/usr/bin/env python|/usr/bin/env python3|g' ${S}/tests/*.py + sed -i -e 's|/usr/bin/env python|/usr/bin/env python3|g' ${S}/tests/testsuites/*.py +} + TESTDIR = "tests" do_compile_ptest() { echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${TESTDIR}/Makefile @@ -121,6 +132,8 @@ do_install_ptest() { # fix the module load path with runtime/.libs find ${D}${PTEST_PATH}/${TESTDIR} -name "*.conf" -o -name "*.sh" -o -name "*.c" | xargs \ sed -i -e 's:../plugins/.*/.libs/:../runtime/.libs/:g' + # fix the python3 path for tests/set-envar + sed -i -e s:${HOSTTOOLS_DIR}:${bindir}:g ${D}${PTEST_PATH}/tests/set-envvars } do_install_append() { @@ -135,6 +148,10 @@ do_install_append() { install -d 0755 ${D}${sysconfdir}/rsyslog.d echo '$ModLoad imjournal' >> ${D}${sysconfdir}/rsyslog.d/imjournal.conf fi + if ${@bb.utils.contains('PACKAGECONFIG', 'mmjsonparse', 'true', 'false', d)}; then + install -d 0755 ${D}${sysconfdir}/rsyslog.d + echo '$ModLoad mmjsonparse' >> ${D}${sysconfdir}/rsyslog.d/mmjsonparse.conf + fi } FILES_${PN} += "${bindir}" @@ -155,11 +172,30 @@ RDEPENDS_${PN} += "logrotate" # for rsyslog-ptest VALGRIND = "valgrind" -VALGRIND_mips = "" -VALGRIND_mips64 = "" -VALGRIND_mips64n32 = "" -VALGRIND_arm = "" -VALGRIND_aarch64 = "" + +# valgrind supports armv7 and above +VALGRIND_armv4 = '' +VALGRIND_armv5 = '' +VALGRIND_armv6 = '' + +# X32 isn't supported by valgrind at this time +VALGRIND_linux-gnux32 = '' +VALGRIND_linux-muslx32 = '' + +# Disable for some MIPS variants +VALGRIND_mipsarchr6 = '' +VALGRIND_linux-gnun32 = '' + +# Disable for powerpc64 with musl +VALGRIND_libc-musl_powerpc64 = '' +VALGRIND_libc-musl_powerpc64le = '' + +# RISC-V support for valgrind is not there yet VALGRIND_riscv64 = "" -RDEPENDS_${PN}-ptest += "make diffutils gzip bash gawk coreutils procps" +VALGRIND_riscv32 = "" + +RDEPENDS_${PN}-ptest += "\ + make diffutils gzip bash gawk coreutils procps \ + libgcc python3-core python3-io \ + " RRECOMMENDS_${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock/0001-fix-compile-failure-with-libc-musl.patch b/external/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock/0001-fix-compile-failure-with-libc-musl.patch deleted file mode 100644 index e4bde80a..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock/0001-fix-compile-failure-with-libc-musl.patch +++ /dev/null @@ -1,80 +0,0 @@ -From c51c2c543f3c78b2a68acc61f786f903f2e0fec8 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Sun, 9 Sep 2018 07:28:09 -0400 -Subject: [PATCH] fix compile failure with libc musl - -The lack of random_r in musl: -[snip] -|main.c:1393:7: warning: implicit declaration of function 'random_r'; -did you mean 'random'? [-Wimplicit-function-declaration] -| rv = random_r(&rand_data, &val); -| ^~~~~~~~ -| random -|main.c:1408:30: error: invalid application of 'sizeof' to incomplete -type 'struct random_data' -| memset(&rand_data, 0, sizeof(rand_data)); -[snip] - -s/random_r/random/, s/initstate_r/initstate/ and remove `static struct -random_data rand_data' - -Here is the man of `random_r()': -[snip] -The random_r() function is like random(3), except that instead of using -state information maintained in a global variable -[snip] - -So use random without state information is OK. - -Upstream-Status: Submitted [sanlock-devel@lists.fedorahosted.org] -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - src/main.c | 12 ++++-------- - 1 file changed, 4 insertions(+), 8 deletions(-) - -diff --git a/src/main.c b/src/main.c -index f60b4d3..602c400 100644 ---- a/src/main.c -+++ b/src/main.c -@@ -84,7 +84,6 @@ static char command[COMMAND_MAX]; - static int cmd_argc; - static char **cmd_argv; - static struct thread_pool pool; --static struct random_data rand_data; - static char rand_state[32]; - static pthread_mutex_t rand_mutex = PTHREAD_MUTEX_INITIALIZER; - static const char *run_dir = NULL; -@@ -1386,16 +1385,15 @@ int get_rand(int a, int b); - - int get_rand(int a, int b) - { -- int32_t val; -- int rv; -+ long int rv; - - pthread_mutex_lock(&rand_mutex); -- rv = random_r(&rand_data, &val); -+ rv = random(); - pthread_mutex_unlock(&rand_mutex); - if (rv < 0) - return rv; - -- return a + (int) (((float)(b - a + 1)) * val / (RAND_MAX+1.0)); -+ return a + (int) (((float)(b - a + 1)) * rv / (RAND_MAX+1.0)); - } - - static void setup_host_name(void) -@@ -1405,9 +1403,7 @@ static void setup_host_name(void) - uuid_t uu; - - memset(rand_state, 0, sizeof(rand_state)); -- memset(&rand_data, 0, sizeof(rand_data)); -- -- initstate_r(time(NULL), rand_state, sizeof(rand_state), &rand_data); -+ initstate(time(NULL), rand_state, sizeof(rand_state)); - - /* use host name from command line */ - --- -2.8.1 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock/0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch b/external/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock/0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch new file mode 100644 index 00000000..a0b721c4 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock/0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch @@ -0,0 +1,51 @@ +From 78a9cffb1c760466933bbbcbae7ecb9b30a3e6a5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 21 Nov 2019 13:47:42 -0800 +Subject: [PATCH] sanlock: Replace "cp -a" with "cp -R --no-dereference + --preserve=mode, links" + +Using "cp -a" leaks UID of user running the builds + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/Makefile | 8 ++++---- + wdmd/Makefile | 4 ++-- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index 533dd79..2fc9ba5 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -127,9 +127,9 @@ install: all + $(INSTALL) -c -m 755 $(LIBSO_CLIENT_TARGET) $(DESTDIR)/$(LIBDIR) + $(INSTALL) -c -m 644 $(LIBPC_ENTIRE_TARGET) $(DESTDIR)/$(LIBDIR)/pkgconfig + $(INSTALL) -c -m 644 $(LIBPC_CLIENT_TARGET) $(DESTDIR)/$(LIBDIR)/pkgconfig +- cp -a $(LIB_ENTIRE_TARGET).so $(DESTDIR)/$(LIBDIR) +- cp -a $(LIB_CLIENT_TARGET).so $(DESTDIR)/$(LIBDIR) +- cp -a $(LIB_ENTIRE_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) +- cp -a $(LIB_CLIENT_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) ++ cp -R --no-dereference --preserve=mode,links $(LIB_ENTIRE_TARGET).so $(DESTDIR)/$(LIBDIR) ++ cp -R --no-dereference --preserve=mode,links $(LIB_CLIENT_TARGET).so $(DESTDIR)/$(LIBDIR) ++ cp -R --no-dereference --preserve=mode,links $(LIB_ENTIRE_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) ++ cp -R --no-dereference --preserve=mode,links $(LIB_CLIENT_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) + $(INSTALL) -c -m 644 $(HEADER_TARGET) $(DESTDIR)/$(HEADIR) + $(INSTALL) -m 644 $(MAN_TARGET) $(DESTDIR)/$(MANDIR)/man8/ +diff --git a/wdmd/Makefile b/wdmd/Makefile +index 5849efc..4894517 100644 +--- a/wdmd/Makefile ++++ b/wdmd/Makefile +@@ -68,7 +68,7 @@ install: all + $(INSTALL) -d $(DESTDIR)/$(MANDIR)/man8 + $(INSTALL) -c -m 755 $(CMD_TARGET) $(DESTDIR)/$(BINDIR) + $(INSTALL) -c -m 755 $(SHLIB_TARGET) $(DESTDIR)/$(LIBDIR) +- cp -a $(LIB_TARGET).so $(DESTDIR)/$(LIBDIR) +- cp -a $(LIB_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) ++ cp -R --no-dereference --preserve=mode,links $(LIB_TARGET).so $(DESTDIR)/$(LIBDIR) ++ cp -R --no-dereference --preserve=mode,links $(LIB_TARGET).so.$(SOMAJOR) $(DESTDIR)/$(LIBDIR) + $(INSTALL) -c -m 644 $(HEADER_TARGET) $(DESTDIR)/$(HEADIR) + $(INSTALL) -m 644 $(MAN_TARGET) $(DESTDIR)/$(MANDIR)/man8 +-- +2.24.0 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock_3.6.0.bb b/external/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock_3.6.0.bb deleted file mode 100644 index c51bccce..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock_3.6.0.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "A shared storage lock manager" -DESCRIPTION = "sanlock is a lock manager built on shared storage. Hosts with access \ -to the storage can perform locking. An application running on the \ -hosts is given a small amount of space on the shared block device or \ -file, and uses sanlock for its own application-specific synchronization. \ -Internally, the sanlock daemon manages locks using two disk-based \ -lease algorithms: delta leases and paxos leases." -HOMEPAGE = "https://pagure.io/sanlock" -SECTION = "utils" - -LICENSE = "LGPLv2+ & GPLv2 & GPLv2+" -LIC_FILES_CHKSUM = "file://README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22" - -SRC_URI = "git://pagure.io/sanlock.git;protocol=http \ - file://0001-fix-compile-failure-with-libc-musl.patch \ - " -SRCREV = "90b2ffa77edd46bea007b7bb39bfd4d2db2ff7af" -S = "${WORKDIR}/git" - -DEPENDS = "libaio util-linux" - -inherit distutils - -do_configure[noexec] = "1" - -do_compile_prepend () { - oe_runmake -C wdmd CMD_LDFLAGS="${LDFLAGS}" LIB_LDFLAGS="${LDFLAGS}" - oe_runmake -C src CMD_LDFLAGS="${LDFLAGS}" LIB_ENTIRE_LDFLAGS="${LDFLAGS}" LIB_CLIENT_LDFLAGS="${LDFLAGS}" - cd ${S}/python -} - -do_install_prepend () { - oe_runmake -C wdmd DESTDIR=${D} LIBDIR=${libdir} install - oe_runmake -C src DESTDIR=${D} LIBDIR=${libdir} install - cd ${S}/python -} diff --git a/external/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb b/external/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb new file mode 100644 index 00000000..ffd46da0 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb @@ -0,0 +1,45 @@ +SUMMARY = "A shared storage lock manager" +DESCRIPTION = "sanlock is a lock manager built on shared storage. Hosts with access \ +to the storage can perform locking. An application running on the \ +hosts is given a small amount of space on the shared block device or \ +file, and uses sanlock for its own application-specific synchronization. \ +Internally, the sanlock daemon manages locks using two disk-based \ +lease algorithms: delta leases and paxos leases." +HOMEPAGE = "https://pagure.io/sanlock" +SECTION = "utils" + +LICENSE = "LGPLv2+ & GPLv2 & GPLv2+" +LIC_FILES_CHKSUM = "file://../README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22" + +PV .= "+git${SRCPV}" + +SRC_URI = "git://pagure.io/sanlock.git;protocol=http \ + file://0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch;patchdir=../ \ + " +SRCREV = "cff348800722f7dadf030ffe7494c2df714996e3" + +S = "${WORKDIR}/git/python" + +DEPENDS = "libaio util-linux" + +inherit distutils3 useradd + +do_configure[noexec] = "1" + +do_compile_prepend () { + oe_runmake -C ${S}/../wdmd CMD_LDFLAGS="${LDFLAGS}" LIB_LDFLAGS="${LDFLAGS}" + oe_runmake -C ${S}/../src CMD_LDFLAGS="${LDFLAGS}" LIB_ENTIRE_LDFLAGS="${LDFLAGS}" LIB_CLIENT_LDFLAGS="${LDFLAGS}" +} + +do_install_prepend () { + oe_runmake -C ${S}/../wdmd DESTDIR=${D} LIBDIR=${libdir} install + oe_runmake -C ${S}/../src DESTDIR=${D} LIBDIR=${libdir} install +} + +SANLOCKGROUP ?= "sanlock" +SANLOCKUSER ?= "sanlock" +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system ${SANLOCKGROUP}" +USERADD_PARAM_${PN} = "--system -g ${SANLOCKGROUP} -G disk \ + --home-dir /run/${SANLOCKUSER} --no-create-home \ + --shell /sbin/nologin ${SANLOCKUSER}" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb b/external/meta-openembedded/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb index 91c50027..a527f773 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb @@ -11,7 +11,7 @@ LICENSE = "EPL-1.0" LIC_FILES_CHKSUM = "file://COPYING;md5=f300afd598546add034364cd0a533261" DEPENDS = "curl libpam openssl sblim-sfc-common unzip-native" -inherit distro_features_check +inherit features_check REQUIRED_DISTRO_FEATURES = "pam" SRC_URI = "http://downloads.sourceforge.net/sblim/${BP}.tar.bz2 \ diff --git a/external/meta-openembedded/meta-oe/recipes-extended/scsirastools/scsirastools_1.6.6.bb b/external/meta-openembedded/meta-oe/recipes-extended/scsirastools/scsirastools_1.6.6.bb index 77d3cfee..2b7571e2 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/scsirastools/scsirastools_1.6.6.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/scsirastools/scsirastools_1.6.6.bb @@ -5,7 +5,7 @@ DESCRIPTION = "scsirastools were designed to add to the Serviceability of \ maintenance or service functions. It handles SCSI, \ Linux SW RAID, SAS, SATA, and USB devices via SCSI emulation." HOMEPAGE = "http://scsirastools.sourceforge.net/" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=687ea108478d26152ae46eb29d9d1545" DEPENDS += "groff-native" @@ -43,5 +43,5 @@ FILES_${PN}-diskmon = "${sbindir}/sgdiskmon ${sysconfdir}/init.d/sgdisk" FILES_${PN}-raidmon = "${sbindir}/sgraidmon ${sysconfdir}/init.d/sgraid" RDEPENDS_${PN} += "bash" -RDEPENDS_${PN}-diskmon += "${PN}" -RDEPENDS_${PN}-raidmon += "${PN}" +RDEPENDS_${PN}-diskmon += "${PN} bash" +RDEPENDS_${PN}-raidmon += "${PN} bash" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/sigrok/libsigrok_0.5.2.bb b/external/meta-openembedded/meta-oe/recipes-extended/sigrok/libsigrok_0.5.2.bb new file mode 100644 index 00000000..e8c36a81 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/sigrok/libsigrok_0.5.2.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "libsigrok is a shared library written in C, which provides the basic hardware access drivers for logic analyzers and other supported devices, as well as input/output file format support." +HOMEPAGE = "http://sigrok.org/wiki/Main_Page" + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +DEPENDS = "glib-2.0 libzip" + +PACKAGECONFIG[serialport] = "--with-libserialport,--without-libserialport,libserialport" +PACKAGECONFIG[ftdi] = "--with-libftdi,--without-libftdi,libftdi" +PACKAGECONFIG[usb] = "--with-libusb,--without-libusb,libusb" +PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx,glibmm doxygen-native" +PACKAGECONFIG[bluez5] = "--with-libbluez,--without-libbluez,bluez5" +PACKAGECONFIG[hidapi] = "--with-libhidapi,--without-libhidapi,hidapi" + +PACKAGECONFIG ??= "serialport ftdi usb" + +inherit autotools pkgconfig mime + +SRC_URI = "http://sigrok.org/download/source/libsigrok/libsigrok-${PV}.tar.gz" + +SRC_URI[md5sum] = "e258d471b6d5eaa58daf927a0dc3ba67" +SRC_URI[sha256sum] = "4d341f90b6220d3e8cb251dacf726c41165285612248f2c52d15df4590a1ce3c" + +FILES_${PN} += "${datadir}/*" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/sigrok/libsigrokdecode_0.5.3.bb b/external/meta-openembedded/meta-oe/recipes-extended/sigrok/libsigrokdecode_0.5.3.bb new file mode 100644 index 00000000..f9c1d1a3 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/sigrok/libsigrokdecode_0.5.3.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "libsigrokdecode is a shared library written in C, which provides (streaming) protocol decoding functionality." +HOMEPAGE = "http://sigrok.org/wiki/Main_Page" + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +DEPENDS = "glib-2.0 python3" + +inherit autotools pkgconfig + +SRC_URI = "http://sigrok.org/download/source/libsigrokdecode/libsigrokdecode-${PV}.tar.gz" + +SRC_URI[md5sum] = "7ba4ed4ef1f06ae96979751e096c2821" +SRC_URI[sha256sum] = "c50814aa6743cd8c4e88c84a0cdd8889d883c3be122289be90c63d7d67883fc0" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/sigrok/sigrok-cli_0.7.1.bb b/external/meta-openembedded/meta-oe/recipes-extended/sigrok/sigrok-cli_0.7.1.bb new file mode 100644 index 00000000..369e2f6f --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/sigrok/sigrok-cli_0.7.1.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "sigrok-cli is a command-line frontend for sigrok." +HOMEPAGE = "http://sigrok.org/wiki/Main_Page" + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +DEPENDS = "libsigrok" + +PACKAGECONFIG[decode] = "--with-libsigrokdecode,--without-libsigrokdecode,libsigrokdecode" + +PACKAGECONFIG ??= "decode" + +inherit autotools pkgconfig mime-xdg + +SRC_URI = "http://sigrok.org/download/source/sigrok-cli/sigrok-cli-${PV}.tar.gz" +SRC_URI[md5sum] = "3f45ce664bad529d8b3f78a61b017d75" +SRC_URI[sha256sum] = "f52413429f47d457c333db0fd068416ab7a3f9e35ca76de8624dc5ac6fb07797" + +FILES_${PN} += "${datadir}/icons/hicolor" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/smartmontools/files/0001-os_linux.cpp-Use-realpath-BSD-POSIX-instead-of-canon.patch b/external/meta-openembedded/meta-oe/recipes-extended/smartmontools/files/0001-os_linux.cpp-Use-realpath-BSD-POSIX-instead-of-canon.patch deleted file mode 100644 index 91e64d21..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/smartmontools/files/0001-os_linux.cpp-Use-realpath-BSD-POSIX-instead-of-canon.patch +++ /dev/null @@ -1,28 +0,0 @@ -From f28aa188e5b0ea85369febe657b8807b8025038b Mon Sep 17 00:00:00 2001 -From: chrfranke <authors@smartmontools.org> -Date: Wed, 8 Nov 2017 06:15:50 +0000 -Subject: [PATCH] os_linux.cpp: Use 'realpath()' (BSD, POSIX) instead of - 'canonicalize_file_name()' (GNU extension). This fixes build on systems with - musl libc (#921). - -git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@4603 4ea69e1a-61f1-4043-bf83-b5c94c648137 - -Upstream-Status: Backport [https://www.smartmontools.org/ticket/921] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - os_linux.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/os_linux.cpp b/os_linux.cpp -index 134d5bc..935f9c7 100644 ---- a/os_linux.cpp -+++ b/os_linux.cpp -@@ -3176,7 +3176,7 @@ static bool is_hpsa(const char * name) - { - char path[128]; - snprintf(path, sizeof(path), "/sys/block/%s/device", name); -- char * syshostpath = canonicalize_file_name(path); -+ char * syshostpath = realpath(name, (char *)0); - if (!syshostpath) - return false; - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/smartmontools/smartmontools_6.6.bb b/external/meta-openembedded/meta-oe/recipes-extended/smartmontools/smartmontools_7.1.bb index c77c1055..b401272d 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/smartmontools/smartmontools_6.6.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/smartmontools/smartmontools_7.1.bb @@ -16,15 +16,14 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/smartmontools/smartmontools-${PV}.tar.gz \ file://initd.smartd \ file://smartmontools.default \ file://smartd.service \ - file://0001-os_linux.cpp-Use-realpath-BSD-POSIX-instead-of-canon.patch \ " PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'libcap-ng selinux', d)}" PACKAGECONFIG[libcap-ng] = "--with-libcap-ng=yes,--with-libcap-ng=no,libcap-ng" PACKAGECONFIG[selinux] = "--with-selinux=yes,--with-selinux=no,libselinux" -SRC_URI[md5sum] = "9ae2c6e7131cd2813edcc65cbe5f223f" -SRC_URI[sha256sum] = "51f43d0fb064fccaf823bbe68cf0d317d0895ff895aa353b3339a3b316a53054" +SRC_URI[md5sum] = "430cd5f64caa4524018b536e5ecd9c29" +SRC_URI[sha256sum] = "3f734d2c99deb1e4af62b25d944c6252de70ca64d766c4c7294545a2e659b846" inherit autotools update-rc.d systemd diff --git a/external/meta-openembedded/meta-oe/recipes-extended/snappy/snappy_1.1.7.bb b/external/meta-openembedded/meta-oe/recipes-extended/snappy/snappy_1.1.8.bb index 9f37c5fc..d6d1e411 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/snappy/snappy_1.1.7.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/snappy/snappy_1.1.8.bb @@ -10,10 +10,10 @@ compression ratio." LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=f62f3080324a97b3159a7a7e61812d0c" -SRC_URI = "https://src.fedoraproject.org/repo/pkgs/snappy/snappy-1.1.7.tar.gz/sha512/32046f532606ba545a4e4825c0c66a19be449f2ca2ff760a6fa170a3603731479a7deadb683546e5f8b5033414c50f4a9a29f6d23b7a41f047e566e69eca7caf/snappy-1.1.7.tar.gz" +SRC_URI = "https://src.fedoraproject.org/repo/pkgs/snappy/snappy-1.1.8.tar.gz/sha512/efe18ff1b3edda1b4b6cefcbc6da8119c05d63afdbf7a784f3490353c74dced76baed7b5f1aa34b99899729192b9d657c33c76de4b507a51553fa8001ae75c1c/snappy-1.1.8.tar.gz" -SRC_URI[md5sum] = "ee9086291c9ae8deb4dac5e0b85bf54a" -SRC_URI[sha256sum] = "3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4" +SRC_URI[md5sum] = "70e48cba7fecf289153d009791c9977f" +SRC_URI[sha256sum] = "16b677f07832a612b0836178db7f374e414f94657c138e6993cbfc5dcc58651f" inherit cmake pkgconfig diff --git a/external/meta-openembedded/meta-oe/recipes-extended/socketcan/can-isotp_git.bb b/external/meta-openembedded/meta-oe/recipes-extended/socketcan/can-isotp_git.bb index 6ce3cab1..e40e1cd2 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/socketcan/can-isotp_git.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/socketcan/can-isotp_git.bb @@ -1,6 +1,6 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=72d977d697c3c05830fdff00a7448931" -SRCREV = "6003f9997587e6a563cebf1f246bcd0eb6deff3d" +SRCREV = "b31bce98d65f894aad6427bcf6f3f7822e261a59" PV = "1.0+git${SRCPV}" SRC_URI = "git://github.com/hartkopp/can-isotp.git;protocol=https" @@ -10,3 +10,5 @@ S = "${WORKDIR}/git" inherit module EXTRA_OEMAKE += "KERNELDIR=${STAGING_KERNEL_DIR}" + +PNBLACKLIST[can-isotp] = "Kernel module Needs forward porting to kernel 5.2+" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils_git.bb b/external/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils_git.bb index a2d62c36..51936881 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils_git.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/socketcan/can-utils_git.bb @@ -1,16 +1,15 @@ SUMMARY = "Linux CAN network development utilities" -DESCRIPTION = "Linux CAN network development" LICENSE = "GPLv2 & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://include/linux/can.h;endline=43;md5=390a2c9a3c5e3595a069ac1436553ee7" +LIC_FILES_CHKSUM = "file://include/linux/can.h;endline=44;md5=a9e1169c6c9a114a61329e99f86fdd31" DEPENDS = "libsocketcan" -SRC_URI = "git://github.com/linux-can/${BPN}.git;protocol=git;branch=master" -SRCREV = "4c8fb05cb4d6ddcd67299008db54af423f86fd05" +SRC_URI = "git://github.com/linux-can/${BPN}.git;protocol=git" -PV = "0.0+gitr${SRCPV}" +SRCREV = "da65fdfe0d1986625ee00af0b56ae17ec132e700" + +PV = "2020.02.04" S = "${WORKDIR}/git" inherit autotools pkgconfig - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.10.bb b/external/meta-openembedded/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb index 60ca5801..0debe47e 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.10.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb @@ -5,7 +5,7 @@ SECTION = "libs/network" LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://src/libsocketcan.c;beginline=3;endline=17;md5=97e38adced4385d8fba1ae2437cedee1" -SRCREV = "51f1610160a1707f026f8c2d714a6f7aa3ca232b" +SRCREV = "0ff01ae7e4d271a7b81241e7a7026bfcea0add3f" SRC_URI = "git://git.pengutronix.de/git/tools/libsocketcan.git;protocol=git" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/0001-Fix-build-with-musl-backtrace-APIs-are-glibc-specifi.patch b/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/0001-Fix-build-with-musl-backtrace-APIs-are-glibc-specifi.patch index 7d3f8a19..cb806115 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/0001-Fix-build-with-musl-backtrace-APIs-are-glibc-specifi.patch +++ b/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/0001-Fix-build-with-musl-backtrace-APIs-are-glibc-specifi.patch @@ -9,42 +9,41 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> userspace/libsinsp/utils.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) -diff --git a/userspace/libsinsp/utils.cpp b/userspace/libsinsp/utils.cpp -index 8f23f9c..c496a57 100644 --- a/userspace/libsinsp/utils.cpp +++ b/userspace/libsinsp/utils.cpp -@@ -21,7 +21,9 @@ along with sysdig. If not, see <http://www.gnu.org/licenses/>. +@@ -22,7 +22,7 @@ limitations under the License. #include <limits.h> #include <stdlib.h> #include <sys/time.h> -+#ifdef __GLIBC__ +-#ifndef CYGWING_AGENT ++#if !defined(CYGWING_AGENT) || defined(__GLIBC__) #include <execinfo.h> -+#endif + #endif #include <unistd.h> - #include <sys/time.h> - #include <netdb.h> -@@ -741,7 +743,7 @@ uint64_t sinsp_utils::get_current_time_ns() - return tv.tv_sec * (uint64_t) 1000000000 + tv.tv_usec * 1000; - } +@@ -780,6 +780,7 @@ bool sinsp_utils::glob_match(const char --#ifndef _WIN32 -+#if defined(_WIN32) && defined(__GLIBC__) + #ifndef CYGWING_AGENT + #ifndef _WIN32 ++#ifdef __GLIBC__ void sinsp_utils::bt(void) { static const char start[] = "BACKTRACE ------------"; -diff --git a/userspace/libsinsp/utils.h b/userspace/libsinsp/utils.h -index 600d00b..4ab4650 100644 +@@ -801,6 +802,7 @@ void sinsp_utils::bt(void) + + free(bt_syms); + } ++#endif // Glibc + #endif // _WIN32 + #endif // CYGWING_AGENT + --- a/userspace/libsinsp/utils.h +++ b/userspace/libsinsp/utils.h -@@ -79,7 +79,7 @@ public: +@@ -104,7 +104,7 @@ public: - static uint64_t get_current_time_ns(); + static bool glob_match(const char *pattern, const char *string); -#ifndef _WIN32 +#if not defined(_WIN32) && defined(__GLIBC__) // // Print the call stack // --- -2.6.2 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/0001-fix-build-with-LuaJIT-2.1-betas.patch b/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/0001-fix-build-with-LuaJIT-2.1-betas.patch new file mode 100644 index 00000000..71b0b8c8 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/0001-fix-build-with-LuaJIT-2.1-betas.patch @@ -0,0 +1,96 @@ +From ae82de664a6ba6ab2654adf9bed81f22b6fdc19d Mon Sep 17 00:00:00 2001 +From: Evgeni Golov <evgeni@golov.de> +Date: Sun, 27 Aug 2017 13:51:19 +0200 +Subject: [PATCH] fix build with LuaJIT 2.1 betas + +LuaJIT 2.1 drops some compat symbols [1]. And while I think that this is +wrong, as it breaks compatibility with Lua 5.1 [2], it is quite easy to +adopt the code to work with both versions (2.0 and 2.1) of LuaJIT and +remain Lua 5.1 compatible. + +[1] https://github.com/LuaJIT/LuaJIT/commit/dc320ca70f2c5bb3977b82853bcee6dad2523d01 +[2] https://github.com/LuaJIT/LuaJIT/issues/325 + +Upstream-Status: Submitted [https://github.com/LuaJIT/LuaJIT/issues/325] +Signed-off-by: Evgeni Golov <evgeni@golov.de> +sysdig-CLA-1.0-signed-off-by: Evgeni Golov <evgeni@golov.de> +--- + CMakeLists.txt | 2 +- + userspace/libsinsp/chisel.cpp | 6 +++--- + userspace/libsinsp/lua_parser.cpp | 2 +- + userspace/libsinsp/lua_parser_api.cpp | 2 +- + 4 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d7020493..33e524f5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -140,7 +140,7 @@ option(USE_BUNDLED_DEPS "Enable bundled dependencies instead of using the system + option(USE_BUNDLED_LUAJIT "Enable building of the bundled LuaJIT" ${USE_BUNDLED_DEPS}) + + if(NOT USE_BUNDLED_LUAJIT) +- find_path(LUAJIT_INCLUDE luajit.h PATH_SUFFIXES luajit-2.0 luajit) ++ find_path(LUAJIT_INCLUDE luajit.h PATH_SUFFIXES luajit-2.1 luajit-2.0 luajit) + find_library(LUAJIT_LIB NAMES luajit luajit-5.1) + if(LUAJIT_INCLUDE AND LUAJIT_LIB) + message(STATUS "Found LuaJIT: include: ${LUAJIT_INCLUDE}, lib: ${LUAJIT_LIB}") +diff --git a/userspace/libsinsp/chisel.cpp b/userspace/libsinsp/chisel.cpp +index 0a6e3cf8..0c2e255a 100644 +--- a/userspace/libsinsp/chisel.cpp ++++ b/userspace/libsinsp/chisel.cpp +@@ -98,7 +98,7 @@ void lua_stackdump(lua_State *L) + // Lua callbacks + /////////////////////////////////////////////////////////////////////////////// + #ifdef HAS_LUA_CHISELS +-const static struct luaL_reg ll_sysdig [] = ++const static struct luaL_Reg ll_sysdig [] = + { + {"set_filter", &lua_cbacks::set_global_filter}, + {"set_snaplen", &lua_cbacks::set_snaplen}, +@@ -134,7 +134,7 @@ const static struct luaL_reg ll_sysdig [] = + {NULL,NULL} + }; + +-const static struct luaL_reg ll_chisel [] = ++const static struct luaL_Reg ll_chisel [] = + { + {"request_field", &lua_cbacks::request_field}, + {"set_filter", &lua_cbacks::set_filter}, +@@ -146,7 +146,7 @@ const static struct luaL_reg ll_chisel [] = + {NULL,NULL} + }; + +-const static struct luaL_reg ll_evt [] = ++const static struct luaL_Reg ll_evt [] = + { + {"field", &lua_cbacks::field}, + {"get_num", &lua_cbacks::get_num}, +diff --git a/userspace/libsinsp/lua_parser.cpp b/userspace/libsinsp/lua_parser.cpp +index 0e26617d..78810d96 100644 +--- a/userspace/libsinsp/lua_parser.cpp ++++ b/userspace/libsinsp/lua_parser.cpp +@@ -32,7 +32,7 @@ extern "C" { + #include "lauxlib.h" + } + +-const static struct luaL_reg ll_filter [] = ++const static struct luaL_Reg ll_filter [] = + { + {"rel_expr", &lua_parser_cbacks::rel_expr}, + {"bool_op", &lua_parser_cbacks::bool_op}, +diff --git a/userspace/libsinsp/lua_parser_api.cpp b/userspace/libsinsp/lua_parser_api.cpp +index c89e9126..e0169fe1 100644 +--- a/userspace/libsinsp/lua_parser_api.cpp ++++ b/userspace/libsinsp/lua_parser_api.cpp +@@ -266,7 +266,7 @@ int lua_parser_cbacks::rel_expr(lua_State *ls) + string err = "Got non-table as in-expression operand\n"; + throw sinsp_exception("parser API error"); + } +- int n = luaL_getn(ls, 4); /* get size of table */ ++ int n = (int)lua_objlen(ls, 4); /* get size of table */ + for (i=1; i<=n; i++) + { + lua_rawgeti(ls, 4, i); +-- +2.25.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Port-to-build-with-lua-5.2.patch b/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Port-to-build-with-lua-5.2.patch deleted file mode 100644 index 8fec0ca5..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Port-to-build-with-lua-5.2.patch +++ /dev/null @@ -1,108 +0,0 @@ -From c2782a6ca968190e221c25b0890600ba8cd43798 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 23 Oct 2015 00:23:15 -0700 -Subject: [PATCH] libsinsp: Port to build with lua >= 5.2 - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - userspace/libsinsp/chisel.cpp | 40 +++++++++++++++++++++++++++++----------- - 1 file changed, 29 insertions(+), 11 deletions(-) - -diff --git a/userspace/libsinsp/chisel.cpp b/userspace/libsinsp/chisel.cpp -index 3cfbd8d..2db9348 100644 ---- a/userspace/libsinsp/chisel.cpp -+++ b/userspace/libsinsp/chisel.cpp -@@ -94,7 +94,7 @@ void lua_stackdump(lua_State *L) - // Lua callbacks - /////////////////////////////////////////////////////////////////////////////// - #ifdef HAS_LUA_CHISELS --const static struct luaL_reg ll_sysdig [] = -+const static struct luaL_Reg ll_sysdig [] = - { - {"set_filter", &lua_cbacks::set_global_filter}, - {"set_snaplen", &lua_cbacks::set_snaplen}, -@@ -120,7 +120,7 @@ const static struct luaL_reg ll_sysdig [] = - {NULL,NULL} - }; - --const static struct luaL_reg ll_chisel [] = -+const static struct luaL_Reg ll_chisel [] = - { - {"request_field", &lua_cbacks::request_field}, - {"set_filter", &lua_cbacks::set_filter}, -@@ -131,7 +131,7 @@ const static struct luaL_reg ll_chisel [] = - {NULL,NULL} - }; - --const static struct luaL_reg ll_evt [] = -+const static struct luaL_Reg ll_evt [] = - { - {"field", &lua_cbacks::field}, - {"get_num", &lua_cbacks::get_num}, -@@ -853,10 +853,28 @@ bool sinsp_chisel::parse_view_info(lua_State *ls, OUT chisel_desc* cd) - - - #ifdef HAS_LUA_CHISELS -+static void chisel_lua_registerlib(lua_State *L, const char *libname, -+ const luaL_Reg *l, int ind) -+{ -+#if LUA_VERSION_NUM >= 502 -+ if (libname) -+ { -+ lua_newtable(L); -+ luaL_setfuncs(L, l, ind); -+ lua_pushvalue(L, -1); -+ lua_setglobal(L, libname); -+ } -+ else -+ luaL_setfuncs(L, l, ind); -+#else -+ luaL_register(L, libname, l); -+#endif -+} -+ - // Initializes a lua chisel - bool sinsp_chisel::init_lua_chisel(chisel_desc &cd, string const &fpath) - { -- lua_State* ls = lua_open(); -+ lua_State* ls = luaL_newstate(); - if(ls == NULL) - { - return false; -@@ -867,9 +885,9 @@ bool sinsp_chisel::init_lua_chisel(chisel_desc &cd, string const &fpath) - // - // Load our own lua libs - // -- luaL_openlib(ls, "sysdig", ll_sysdig, 0); -- luaL_openlib(ls, "chisel", ll_chisel, 0); -- luaL_openlib(ls, "evt", ll_evt, 0); -+ chisel_lua_registerlib(ls, "sysdig", ll_sysdig, 0); -+ chisel_lua_registerlib(ls, "chisel", ll_chisel, 0); -+ chisel_lua_registerlib(ls, "evt", ll_evt, 0); - - // - // Add our chisel paths to package.path -@@ -1111,16 +1129,16 @@ void sinsp_chisel::load(string cmdstr) - // - // Open the script - // -- m_ls = lua_open(); -+ m_ls = luaL_newstate(); - - luaL_openlibs(m_ls); - - // - // Load our own lua libs - // -- luaL_openlib(m_ls, "sysdig", ll_sysdig, 0); -- luaL_openlib(m_ls, "chisel", ll_chisel, 0); -- luaL_openlib(m_ls, "evt", ll_evt, 0); -+ chisel_lua_registerlib(m_ls, "sysdig", ll_sysdig, 0); -+ chisel_lua_registerlib(m_ls, "chisel", ll_chisel, 0); -+ chisel_lua_registerlib(m_ls, "evt", ll_evt, 0); - - // - // Add our chisel paths to package.path --- -2.6.2 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/aarch64.patch b/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/aarch64.patch new file mode 100644 index 00000000..f16b0eca --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/aarch64.patch @@ -0,0 +1,359 @@ +Check if legacy syscalls exist + +A lot of legacy syscalls are replaced with *at and are not implemented in newer +architectures like aarch64 + +Upstream-Status: Submitted [https://github.com/draios/sysdig/pull/1601] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/driver/syscall_table.c ++++ b/driver/syscall_table.c +@@ -42,26 +42,46 @@ or GPL2.txt for full copies of the licen + * SYSCALL TABLE + */ + const struct syscall_evt_pair g_syscall_table[SYSCALL_TABLE_SIZE] = { ++#ifdef __NR_open + [__NR_open - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP, PPME_SYSCALL_OPEN_E, PPME_SYSCALL_OPEN_X}, ++#endif ++#ifdef __NR_creat + [__NR_creat - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP, PPME_SYSCALL_CREAT_E, PPME_SYSCALL_CREAT_X}, ++#endif + [__NR_close - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP | UF_SIMPLEDRIVER_KEEP, PPME_SYSCALL_CLOSE_E, PPME_SYSCALL_CLOSE_X}, + [__NR_brk - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_SYSCALL_BRK_4_E, PPME_SYSCALL_BRK_4_X}, + [__NR_read - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_READ_E, PPME_SYSCALL_READ_X}, + [__NR_write - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_WRITE_E, PPME_SYSCALL_WRITE_X}, + [__NR_execve - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP | UF_SIMPLEDRIVER_KEEP, PPME_SYSCALL_EXECVE_19_E, PPME_SYSCALL_EXECVE_19_X}, + [__NR_clone - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP | UF_SIMPLEDRIVER_KEEP, PPME_SYSCALL_CLONE_20_E, PPME_SYSCALL_CLONE_20_X}, ++#ifdef __NR_fork + [__NR_fork - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP | UF_SIMPLEDRIVER_KEEP, PPME_SYSCALL_FORK_20_E, PPME_SYSCALL_FORK_20_X}, ++#endif ++#ifdef __NR_vfork + [__NR_vfork - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP | UF_SIMPLEDRIVER_KEEP, PPME_SYSCALL_VFORK_20_E, PPME_SYSCALL_VFORK_20_X}, ++#endif ++#ifdef __NR_pipe + [__NR_pipe - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP, PPME_SYSCALL_PIPE_E, PPME_SYSCALL_PIPE_X}, ++#endif + [__NR_pipe2 - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP, PPME_SYSCALL_PIPE_E, PPME_SYSCALL_PIPE_X}, ++#ifdef __NR_eventfd + [__NR_eventfd - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP, PPME_SYSCALL_EVENTFD_E, PPME_SYSCALL_EVENTFD_X}, ++#endif + [__NR_eventfd2 - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP, PPME_SYSCALL_EVENTFD_E, PPME_SYSCALL_EVENTFD_X}, + [__NR_futex - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_SYSCALL_FUTEX_E, PPME_SYSCALL_FUTEX_X}, ++#ifdef __NR_stat + [__NR_stat - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_SYSCALL_STAT_E, PPME_SYSCALL_STAT_X}, ++#endif ++#ifdef __NR_lstat + [__NR_lstat - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_SYSCALL_LSTAT_E, PPME_SYSCALL_LSTAT_X}, ++#endif + [__NR_fstat - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_SYSCALL_FSTAT_E, PPME_SYSCALL_FSTAT_X}, ++#ifdef __NR_epoll_wait + [__NR_epoll_wait - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_SYSCALL_EPOLLWAIT_E, PPME_SYSCALL_EPOLLWAIT_X}, ++#endif ++#ifdef __NR_poll + [__NR_poll - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_SYSCALL_POLL_E, PPME_SYSCALL_POLL_X}, ++#endif + #ifdef __NR_select + [__NR_select - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_SYSCALL_SELECT_E, PPME_SYSCALL_SELECT_X}, + #endif +@@ -70,13 +90,21 @@ const struct syscall_evt_pair g_syscall_ + [__NR_getcwd - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_SYSCALL_GETCWD_E, PPME_SYSCALL_GETCWD_X}, + [__NR_chdir - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP | UF_SIMPLEDRIVER_KEEP, PPME_SYSCALL_CHDIR_E, PPME_SYSCALL_CHDIR_X}, + [__NR_fchdir - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP | UF_SIMPLEDRIVER_KEEP, PPME_SYSCALL_FCHDIR_E, PPME_SYSCALL_FCHDIR_X}, ++#ifdef __NR_mkdir + [__NR_mkdir - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_MKDIR_2_E, PPME_SYSCALL_MKDIR_2_X}, ++#endif ++#ifdef __NR_rmdir + [__NR_rmdir - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_RMDIR_2_E, PPME_SYSCALL_RMDIR_2_X}, ++#endif + [__NR_openat - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP, PPME_SYSCALL_OPENAT_2_E, PPME_SYSCALL_OPENAT_2_X}, + [__NR_mkdirat - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_MKDIRAT_E, PPME_SYSCALL_MKDIRAT_X}, ++#ifdef __NR_link + [__NR_link - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_LINK_2_E, PPME_SYSCALL_LINK_2_X}, ++#endif + [__NR_linkat - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_LINKAT_2_E, PPME_SYSCALL_LINKAT_2_X}, ++#ifdef __NR_unlink + [__NR_unlink - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_UNLINK_2_E, PPME_SYSCALL_UNLINK_2_X}, ++#endif + [__NR_unlinkat - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_UNLINKAT_2_E, PPME_SYSCALL_UNLINKAT_2_X}, + [__NR_pread64 - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_PREAD_E, PPME_SYSCALL_PREAD_X}, + [__NR_pwrite64 - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_PWRITE_E, PPME_SYSCALL_PWRITE_X}, +@@ -85,16 +113,22 @@ const struct syscall_evt_pair g_syscall_ + [__NR_preadv - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_PREADV_E, PPME_SYSCALL_PREADV_X}, + [__NR_pwritev - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_PWRITEV_E, PPME_SYSCALL_PWRITEV_X}, + [__NR_dup - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP | UF_SIMPLEDRIVER_KEEP, PPME_SYSCALL_DUP_E, PPME_SYSCALL_DUP_X}, ++#ifdef __NR_dup2 + [__NR_dup2 - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP | UF_SIMPLEDRIVER_KEEP, PPME_SYSCALL_DUP_E, PPME_SYSCALL_DUP_X}, ++#endif + [__NR_dup3 - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP | UF_SIMPLEDRIVER_KEEP, PPME_SYSCALL_DUP_E, PPME_SYSCALL_DUP_X}, ++#ifdef __NR_signalfd + [__NR_signalfd - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP, PPME_SYSCALL_SIGNALFD_E, PPME_SYSCALL_SIGNALFD_X}, ++#endif + [__NR_signalfd4 - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP, PPME_SYSCALL_SIGNALFD_E, PPME_SYSCALL_SIGNALFD_X}, + [__NR_kill - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_KILL_E, PPME_SYSCALL_KILL_X}, + [__NR_tkill - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_TKILL_E, PPME_SYSCALL_TKILL_X}, + [__NR_tgkill - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_TGKILL_E, PPME_SYSCALL_TGKILL_X}, + [__NR_nanosleep - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_SYSCALL_NANOSLEEP_E, PPME_SYSCALL_NANOSLEEP_X}, + [__NR_timerfd_create - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP, PPME_SYSCALL_TIMERFD_CREATE_E, PPME_SYSCALL_TIMERFD_CREATE_X}, ++#ifdef __NR_inotify_init + [__NR_inotify_init - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP, PPME_SYSCALL_INOTIFY_INIT_E, PPME_SYSCALL_INOTIFY_INIT_X}, ++#endif + [__NR_inotify_init1 - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP, PPME_SYSCALL_INOTIFY_INIT_E, PPME_SYSCALL_INOTIFY_INIT_X}, + [__NR_fchmodat - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_FCHMODAT_E, PPME_SYSCALL_FCHMODAT_X}, + [__NR_fchmod - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_FCHMOD_E, PPME_SYSCALL_FCHMOD_X}, +@@ -114,14 +148,22 @@ const struct syscall_evt_pair g_syscall_ + #endif + /* [__NR_old_select - SYSCALL_TABLE_ID0] = {UF_USED, PPME_GENERIC_E, PPME_GENERIC_X}, */ + [__NR_pselect6 - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_GENERIC_E, PPME_GENERIC_X}, ++#ifdef __NR_epoll_create + [__NR_epoll_create - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_GENERIC_E, PPME_GENERIC_X}, ++#endif + [__NR_epoll_ctl - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_GENERIC_E, PPME_GENERIC_X}, ++#ifdef __NR_uselib + [__NR_uselib - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_GENERIC_E, PPME_GENERIC_X}, ++#endif + [__NR_sched_setparam - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_GENERIC_E, PPME_GENERIC_X}, + [__NR_sched_getparam - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_GENERIC_E, PPME_GENERIC_X}, + [__NR_syslog - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_GENERIC_E, PPME_GENERIC_X}, ++#ifdef __NR_chmod + [__NR_chmod - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_CHMOD_E, PPME_SYSCALL_CHMOD_X}, ++#endif ++#ifdef __NR_lchown + [__NR_lchown - SYSCALL_TABLE_ID0] = {UF_USED, PPME_GENERIC_E, PPME_GENERIC_X}, ++#endif + #ifdef __NR_utime + [__NR_utime - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_GENERIC_E, PPME_GENERIC_X}, + #endif +@@ -131,8 +173,9 @@ const struct syscall_evt_pair g_syscall_ + #ifdef __NR_alarm + [__NR_alarm - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_GENERIC_E, PPME_GENERIC_X}, + #endif ++#ifdef __NR_pause + [__NR_pause - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_GENERIC_E, PPME_GENERIC_X}, +- ++#endif + #ifndef __NR_socketcall + [__NR_socket - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP | UF_SIMPLEDRIVER_KEEP, PPME_SOCKET_SOCKET_E, PPME_SOCKET_SOCKET_X}, + [__NR_bind - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP, PPME_SOCKET_BIND_E, PPME_SOCKET_BIND_X}, +@@ -184,9 +227,13 @@ const struct syscall_evt_pair g_syscall_ + [__NR_process_vm_writev - SYSCALL_TABLE_ID0] = {UF_USED, PPME_GENERIC_E, PPME_GENERIC_X}, + #endif + ++#ifdef __NR_rename + [__NR_rename - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_RENAME_E, PPME_SYSCALL_RENAME_X}, ++#endif + [__NR_renameat - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_RENAMEAT_E, PPME_SYSCALL_RENAMEAT_X}, ++#ifdef __NR_symlink + [__NR_symlink - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_SYMLINK_E, PPME_SYSCALL_SYMLINK_X}, ++#endif + [__NR_symlinkat - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_SYMLINKAT_E, PPME_SYSCALL_SYMLINKAT_X}, + [__NR_sendfile - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_SENDFILE_E, PPME_SYSCALL_SENDFILE_X}, + #ifdef __NR_sendfile64 +@@ -255,7 +302,9 @@ const struct syscall_evt_pair g_syscall_ + #ifdef __NR_getresgid32 + [__NR_getresgid32 - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_GETRESGID_E, PPME_SYSCALL_GETRESGID_X }, + #endif ++#ifdef __NR_getdents + [__NR_getdents - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_SYSCALL_GETDENTS_E, PPME_SYSCALL_GETDENTS_X}, ++#endif + [__NR_getdents64 - SYSCALL_TABLE_ID0] = {UF_USED | UF_ALWAYS_DROP, PPME_SYSCALL_GETDENTS64_E, PPME_SYSCALL_GETDENTS64_X}, + #ifdef __NR_setns + [__NR_setns - SYSCALL_TABLE_ID0] = {UF_USED, PPME_SYSCALL_SETNS_E, PPME_SYSCALL_SETNS_X}, +@@ -298,19 +347,33 @@ const enum ppm_syscall_code g_syscall_co + [__NR_exit - SYSCALL_TABLE_ID0] = PPM_SC_EXIT, + [__NR_read - SYSCALL_TABLE_ID0] = PPM_SC_READ, + [__NR_write - SYSCALL_TABLE_ID0] = PPM_SC_WRITE, ++#ifdef __NR_open + [__NR_open - SYSCALL_TABLE_ID0] = PPM_SC_OPEN, ++#endif + [__NR_close - SYSCALL_TABLE_ID0] = PPM_SC_CLOSE, ++#ifdef __NR_creat + [__NR_creat - SYSCALL_TABLE_ID0] = PPM_SC_CREAT, ++#endif ++#ifdef __NR_link + [__NR_link - SYSCALL_TABLE_ID0] = PPM_SC_LINK, ++#endif ++#ifdef __NR_unlink + [__NR_unlink - SYSCALL_TABLE_ID0] = PPM_SC_UNLINK, ++#endif + [__NR_chdir - SYSCALL_TABLE_ID0] = PPM_SC_CHDIR, + #ifdef __NR_time + [__NR_time - SYSCALL_TABLE_ID0] = PPM_SC_TIME, + #endif ++#ifdef __NR_mknod + [__NR_mknod - SYSCALL_TABLE_ID0] = PPM_SC_MKNOD, ++#endif ++#ifdef __NR_chmod + [__NR_chmod - SYSCALL_TABLE_ID0] = PPM_SC_CHMOD, ++#endif + /* [__NR_lchown16 - SYSCALL_TABLE_ID0] = PPM_SC_NR_LCHOWN16, */ ++#ifdef __NR_stat + [__NR_stat - SYSCALL_TABLE_ID0] = PPM_SC_STAT, ++#endif + [__NR_lseek - SYSCALL_TABLE_ID0] = PPM_SC_LSEEK, + [__NR_getpid - SYSCALL_TABLE_ID0] = PPM_SC_GETPID, + [__NR_mount - SYSCALL_TABLE_ID0] = PPM_SC_MOUNT, +@@ -322,17 +385,27 @@ const enum ppm_syscall_code g_syscall_co + [__NR_alarm - SYSCALL_TABLE_ID0] = PPM_SC_ALARM, + #endif + [__NR_fstat - SYSCALL_TABLE_ID0] = PPM_SC_FSTAT, ++#ifdef __NR_pause + [__NR_pause - SYSCALL_TABLE_ID0] = PPM_SC_PAUSE, ++#endif + #ifdef __NR_utime + [__NR_utime - SYSCALL_TABLE_ID0] = PPM_SC_UTIME, + #endif + [__NR_sync - SYSCALL_TABLE_ID0] = PPM_SC_SYNC, + [__NR_kill - SYSCALL_TABLE_ID0] = PPM_SC_KILL, ++#ifdef __NR_rename + [__NR_rename - SYSCALL_TABLE_ID0] = PPM_SC_RENAME, ++#endif ++#ifdef __NR_mkdir + [__NR_mkdir - SYSCALL_TABLE_ID0] = PPM_SC_MKDIR, ++#endif ++#ifdef __NR_rmdir + [__NR_rmdir - SYSCALL_TABLE_ID0] = PPM_SC_RMDIR, ++#endif + [__NR_dup - SYSCALL_TABLE_ID0] = PPM_SC_DUP, ++#ifdef __NR_pipe + [__NR_pipe - SYSCALL_TABLE_ID0] = PPM_SC_PIPE, ++#endif + [__NR_times - SYSCALL_TABLE_ID0] = PPM_SC_TIMES, + [__NR_brk - SYSCALL_TABLE_ID0] = PPM_SC_BRK, + /* [__NR_setgid16 - SYSCALL_TABLE_ID0] = PPM_SC_NR_SETGID16, */ +@@ -345,10 +418,16 @@ const enum ppm_syscall_code g_syscall_co + [__NR_setpgid - SYSCALL_TABLE_ID0] = PPM_SC_SETPGID, + [__NR_umask - SYSCALL_TABLE_ID0] = PPM_SC_UMASK, + [__NR_chroot - SYSCALL_TABLE_ID0] = PPM_SC_CHROOT, ++#ifdef __NR_ustat + [__NR_ustat - SYSCALL_TABLE_ID0] = PPM_SC_USTAT, ++#endif ++#ifdef __NR_dup2 + [__NR_dup2 - SYSCALL_TABLE_ID0] = PPM_SC_DUP2, ++#endif + [__NR_getppid - SYSCALL_TABLE_ID0] = PPM_SC_GETPPID, ++#ifdef __NR_getpgrp + [__NR_getpgrp - SYSCALL_TABLE_ID0] = PPM_SC_GETPGRP, ++#endif + [__NR_setsid - SYSCALL_TABLE_ID0] = PPM_SC_SETSID, + [__NR_sethostname - SYSCALL_TABLE_ID0] = PPM_SC_SETHOSTNAME, + [__NR_setrlimit - SYSCALL_TABLE_ID0] = PPM_SC_SETRLIMIT, +@@ -359,10 +438,18 @@ const enum ppm_syscall_code g_syscall_co + /* [__NR_getgroups16 - SYSCALL_TABLE_ID0] = PPM_SC_NR_GETGROUPS16, */ + /* [__NR_setgroups16 - SYSCALL_TABLE_ID0] = PPM_SC_NR_SETGROUPS16, */ + /* [__NR_old_select - SYSCALL_TABLE_ID0] = PPM_SC_NR_OLD_SELECT, */ ++#ifdef __NR_symlink + [__NR_symlink - SYSCALL_TABLE_ID0] = PPM_SC_SYMLINK, ++#endif ++#ifdef __NR_lstat + [__NR_lstat - SYSCALL_TABLE_ID0] = PPM_SC_LSTAT, ++#endif ++#ifdef __NR_readlink + [__NR_readlink - SYSCALL_TABLE_ID0] = PPM_SC_READLINK, ++#endif ++#ifdef __NR_uselib + [__NR_uselib - SYSCALL_TABLE_ID0] = PPM_SC_USELIB, ++#endif + [__NR_swapon - SYSCALL_TABLE_ID0] = PPM_SC_SWAPON, + [__NR_reboot - SYSCALL_TABLE_ID0] = PPM_SC_REBOOT, + /* [__NR_old_readdir - SYSCALL_TABLE_ID0] = PPM_SC_NR_OLD_READDIR, */ +@@ -399,12 +486,16 @@ const enum ppm_syscall_code g_syscall_co + [__NR_delete_module - SYSCALL_TABLE_ID0] = PPM_SC_DELETE_MODULE, + [__NR_getpgid - SYSCALL_TABLE_ID0] = PPM_SC_GETPGID, + [__NR_fchdir - SYSCALL_TABLE_ID0] = PPM_SC_FCHDIR, ++#ifdef __NR_sysfs + [__NR_sysfs - SYSCALL_TABLE_ID0] = PPM_SC_SYSFS, ++#endif + [__NR_personality - SYSCALL_TABLE_ID0] = PPM_SC_PERSONALITY, + /* [__NR_setfsuid16 - SYSCALL_TABLE_ID0] = PPM_SC_NR_SETFSUID16, */ + /* [__NR_setfsgid16 - SYSCALL_TABLE_ID0] = PPM_SC_NR_SETFSGID16, */ + /* [__NR_llseek - SYSCALL_TABLE_ID0] = PPM_SC_NR_LLSEEK, */ ++#ifdef __NR_getdents + [__NR_getdents - SYSCALL_TABLE_ID0] = PPM_SC_GETDENTS, ++#endif + #ifdef __NR_select + [__NR_select - SYSCALL_TABLE_ID0] = PPM_SC_SELECT, + #endif +@@ -431,7 +522,9 @@ const enum ppm_syscall_code g_syscall_co + [__NR_mremap - SYSCALL_TABLE_ID0] = PPM_SC_MREMAP, + /* [__NR_setresuid16 - SYSCALL_TABLE_ID0] = PPM_SC_NR_SETRESUID16, */ + /* [__NR_getresuid16 - SYSCALL_TABLE_ID0] = PPM_SC_NR_GETRESUID16, */ ++#ifdef __NR_poll + [__NR_poll - SYSCALL_TABLE_ID0] = PPM_SC_POLL, ++#endif + /* [__NR_setresgid16 - SYSCALL_TABLE_ID0] = PPM_SC_NR_SETRESGID16, */ + /* [__NR_getresgid16 - SYSCALL_TABLE_ID0] = PPM_SC_NR_GETRESGID16, */ + [__NR_prctl - SYSCALL_TABLE_ID0] = PPM_SC_PRCTL, +@@ -453,13 +546,17 @@ const enum ppm_syscall_code g_syscall_co + [__NR_getrlimit - SYSCALL_TABLE_ID0] = PPM_SC_GETRLIMIT, + #endif + /* [__NR_mmap_pgoff - SYSCALL_TABLE_ID0] = PPM_SC_NR_MMAP_PGOFF, */ ++#ifdef __NR_lchown + [__NR_lchown - SYSCALL_TABLE_ID0] = PPM_SC_LCHOWN, ++#endif + [__NR_setreuid - SYSCALL_TABLE_ID0] = PPM_SC_SETREUID, + [__NR_setregid - SYSCALL_TABLE_ID0] = PPM_SC_SETREGID, + [__NR_getgroups - SYSCALL_TABLE_ID0] = PPM_SC_GETGROUPS, + [__NR_setgroups - SYSCALL_TABLE_ID0] = PPM_SC_SETGROUPS, + [__NR_fchown - SYSCALL_TABLE_ID0] = PPM_SC_FCHOWN, ++#ifdef __NR_chown + [__NR_chown - SYSCALL_TABLE_ID0] = PPM_SC_CHOWN, ++#endif + [__NR_setfsuid - SYSCALL_TABLE_ID0] = PPM_SC_SETFSUID, + [__NR_setfsgid - SYSCALL_TABLE_ID0] = PPM_SC_SETFSGID, + [__NR_pivot_root - SYSCALL_TABLE_ID0] = PPM_SC_PIVOT_ROOT, +@@ -494,9 +591,13 @@ const enum ppm_syscall_code g_syscall_co + [__NR_io_submit - SYSCALL_TABLE_ID0] = PPM_SC_IO_SUBMIT, + [__NR_io_cancel - SYSCALL_TABLE_ID0] = PPM_SC_IO_CANCEL, + [__NR_exit_group - SYSCALL_TABLE_ID0] = PPM_SC_EXIT_GROUP, ++#ifdef __NR_epoll_create + [__NR_epoll_create - SYSCALL_TABLE_ID0] = PPM_SC_EPOLL_CREATE, ++#endif + [__NR_epoll_ctl - SYSCALL_TABLE_ID0] = PPM_SC_EPOLL_CTL, ++#ifdef __NR_epoll_wait + [__NR_epoll_wait - SYSCALL_TABLE_ID0] = PPM_SC_EPOLL_WAIT, ++#endif + [__NR_remap_file_pages - SYSCALL_TABLE_ID0] = PPM_SC_REMAP_FILE_PAGES, + [__NR_set_tid_address - SYSCALL_TABLE_ID0] = PPM_SC_SET_TID_ADDRESS, + [__NR_timer_create - SYSCALL_TABLE_ID0] = PPM_SC_TIMER_CREATE, +@@ -509,7 +610,9 @@ const enum ppm_syscall_code g_syscall_co + [__NR_clock_getres - SYSCALL_TABLE_ID0] = PPM_SC_CLOCK_GETRES, + [__NR_clock_nanosleep - SYSCALL_TABLE_ID0] = PPM_SC_CLOCK_NANOSLEEP, + [__NR_tgkill - SYSCALL_TABLE_ID0] = PPM_SC_TGKILL, ++#ifdef __NR_utimes + [__NR_utimes - SYSCALL_TABLE_ID0] = PPM_SC_UTIMES, ++#endif + [__NR_mq_open - SYSCALL_TABLE_ID0] = PPM_SC_MQ_OPEN, + [__NR_mq_unlink - SYSCALL_TABLE_ID0] = PPM_SC_MQ_UNLINK, + [__NR_mq_timedsend - SYSCALL_TABLE_ID0] = PPM_SC_MQ_TIMEDSEND, +@@ -523,14 +626,18 @@ const enum ppm_syscall_code g_syscall_co + [__NR_keyctl - SYSCALL_TABLE_ID0] = PPM_SC_KEYCTL, + [__NR_ioprio_set - SYSCALL_TABLE_ID0] = PPM_SC_IOPRIO_SET, + [__NR_ioprio_get - SYSCALL_TABLE_ID0] = PPM_SC_IOPRIO_GET, ++#ifdef __NR_inotify_init + [__NR_inotify_init - SYSCALL_TABLE_ID0] = PPM_SC_INOTIFY_INIT, ++#endif + [__NR_inotify_add_watch - SYSCALL_TABLE_ID0] = PPM_SC_INOTIFY_ADD_WATCH, + [__NR_inotify_rm_watch - SYSCALL_TABLE_ID0] = PPM_SC_INOTIFY_RM_WATCH, + [__NR_openat - SYSCALL_TABLE_ID0] = PPM_SC_OPENAT, + [__NR_mkdirat - SYSCALL_TABLE_ID0] = PPM_SC_MKDIRAT, + [__NR_mknodat - SYSCALL_TABLE_ID0] = PPM_SC_MKNODAT, + [__NR_fchownat - SYSCALL_TABLE_ID0] = PPM_SC_FCHOWNAT, ++#ifdef __NR_futimesat + [__NR_futimesat - SYSCALL_TABLE_ID0] = PPM_SC_FUTIMESAT, ++#endif + [__NR_unlinkat - SYSCALL_TABLE_ID0] = PPM_SC_UNLINKAT, + [__NR_renameat - SYSCALL_TABLE_ID0] = PPM_SC_RENAMEAT, + [__NR_linkat - SYSCALL_TABLE_ID0] = PPM_SC_LINKAT, +@@ -551,9 +658,13 @@ const enum ppm_syscall_code g_syscall_co + #endif + [__NR_epoll_pwait - SYSCALL_TABLE_ID0] = PPM_SC_EPOLL_PWAIT, + [__NR_utimensat - SYSCALL_TABLE_ID0] = PPM_SC_UTIMENSAT, ++#ifdef __NR_signalfd + [__NR_signalfd - SYSCALL_TABLE_ID0] = PPM_SC_SIGNALFD, ++#endif + [__NR_timerfd_create - SYSCALL_TABLE_ID0] = PPM_SC_TIMERFD_CREATE, ++#ifdef __NR_eventfd + [__NR_eventfd - SYSCALL_TABLE_ID0] = PPM_SC_EVENTFD, ++#endif + [__NR_timerfd_settime - SYSCALL_TABLE_ID0] = PPM_SC_TIMERFD_SETTIME, + [__NR_timerfd_gettime - SYSCALL_TABLE_ID0] = PPM_SC_TIMERFD_GETTIME, + [__NR_signalfd4 - SYSCALL_TABLE_ID0] = PPM_SC_SIGNALFD4, diff --git a/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/fix-uint64-const.patch b/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/fix-uint64-const.patch new file mode 100644 index 00000000..5c756294 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/fix-uint64-const.patch @@ -0,0 +1,16 @@ +Fix x86 build + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/userspace/libsinsp/cgroup_limits.cpp ++++ b/userspace/libsinsp/cgroup_limits.cpp +@@ -9,7 +9,7 @@ namespace { + // This reports extremely large values (e.g. almost-but-not-quite 9EiB as set by k8s) as unlimited. + // Note: we use the same maximum value for cpu shares/quotas as well; the typical values are much lower + // and so should never exceed CGROUP_VAL_MAX either +-constexpr const int64_t CGROUP_VAL_MAX = (1UL << 42u) - 1; ++constexpr const int64_t CGROUP_VAL_MAX = (1ULL << 42u) - 1; + + /** + * \brief Read a single int64_t value from cgroupfs diff --git a/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig_git.bb b/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig_git.bb index 4f58281f..04a022af 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig_git.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig_git.bb @@ -3,39 +3,52 @@ DESCRIPTION = "Sysdig is open source, system-level exploration: capture \ system state and activity from a running Linux instance, then save, \ filter and analyze." HOMEPAGE = "http://www.sysdig.org/" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" +LICENSE = "Apache-2.0 & (MIT | GPL-2.0)" +LIC_FILES_CHKSUM = "file://COPYING;md5=f8fee3d59797546cffab04f3b88b2d44" inherit cmake pkgconfig -OECMAKE_GENERATOR = "Unix Makefiles" +#OECMAKE_GENERATOR = "Unix Makefiles" +JIT ?= "jit" +JIT_mipsarchn32 = "" +JIT_mipsarchn64 = "" +JIT_riscv64 = "" +JIT_riscv32 = "" -DEPENDS = "luajit zlib ncurses" +DEPENDS += "lua${JIT} zlib c-ares grpc-native grpc curl ncurses jsoncpp tbb jq openssl elfutils protobuf protobuf-native jq-native" RDEPENDS_${PN} = "bash" -SRC_URI = "git://github.com/draios/sysdig.git;branch=master \ - file://0001-libsinsp-Port-to-build-with-lua-5.2.patch \ +SRC_URI = "git://github.com/draios/sysdig.git;branch=dev \ + file://0001-fix-build-with-LuaJIT-2.1-betas.patch \ file://0001-Fix-build-with-musl-backtrace-APIs-are-glibc-specifi.patch \ + file://fix-uint64-const.patch \ + file://aarch64.patch \ " -SRCREV = "85d16f33a82a17f87ccdbc088749271c71d87013" -PV = "0.1.102+git${SRCPV}" +SRCREV = "8daeef8da752c5f07f439391bc20c5948eb11470" +PV = "0.26.6" S = "${WORKDIR}/git" -DIR_ETC="/etc" -EXTRA_OECMAKE = ' -DUSE_BUNDLED_LUAJIT="OFF" \ - -DUSE_BUNDLED_ZLIB="OFF" \ - -DBUILD_DRIVER="OFF" \ - -DUSE_BUNDLED_NCURSES="OFF" \ - -DDIR_ETC="${DIR_ETC}" \ - ' +EXTRA_OECMAKE = "\ + -DBUILD_DRIVER=OFF \ + -DUSE_BUNDLED_DEPS=OFF \ + -DUSE_BUNDLED_B64=ON \ + -DCREATE_TEST_TARGETS=OFF \ + -DDIR_ETC=${sysconfdir} \ + -DLUA_INCLUDE_DIR=${STAGING_INCDIR}/luajit-2.1 \ + -DLUA_LIBRARY=libluajit-5.1.so \ +" FILES_${PN} += " \ ${DIR_ETC}/* \ ${datadir}/zsh/* \ ${prefix}/src/* \ " - -# luajit not supported on Aarch64 -COMPATIBLE_HOST = "^(?!aarch64).*" - +# Use getaddrinfo_a is a GNU extension in libsinsp +# It should be fixed in sysdig, until then disable +# on musl +# Something like this https://code.videolan.org/ePirat/vlc/-/commit/01fd9fe4c7f6c5558f7345f38abf0152e17853ab is needed to fix it +COMPATIBLE_HOST_libc-musl = "null" +COMPATIBLE_HOST_mips = "null" +COMPATIBLE_HOST_riscv64 = "null" +COMPATIBLE_HOST_riscv32 = "null" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/configure.patch b/external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/configure.patch deleted file mode 100644 index 976e0380..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/configure.patch +++ /dev/null @@ -1,141 +0,0 @@ -From 81c1ba940415595584a837ab1078c64855072f0c Mon Sep 17 00:00:00 2001 -From: Koen Kooi <koen@dominion.thruhere.net> -Date: Mon, 21 Nov 2011 12:00:54 +0100 -Subject: [PATCH] t1lib: add 5.1.2 - -# -# Patch managed by http://www.holgerschurig.de/patcher.html -# - ---- - configure.in | 95 ++++++++++++++++++++++++------------------------------------ - 1 file changed, 38 insertions(+), 57 deletions(-) - -diff --git a/configure.in b/configure.in -index eade4c0..e649ea9 100644 ---- a/configure.in -+++ b/configure.in -@@ -74,9 +74,9 @@ T1LIB_PATCHLEVEL=builtin(eval, MACRO_T1LIB_LT_REVISION) - T1LIB_VERSIONSTRING=\"MACRO_T1LIB_IDENTIFIER\" - - --dnl We use this file by Andreas Zeller to check for libXaw --builtin(include, ac-tools/ice_find_athena.m4) --builtin(include, ac-tools/aclocal.m4) -+#dnl We use this file by Andreas Zeller to check for libXaw -+#builtin(include, ac-tools/ice_find_athena.m4) -+#builtin(include, ac-tools/aclocal.m4) - - dnl We want these before the checks, so the checks can modify their values. - test -z "$LDLIBS" && LDLIBS=-lm AC_SUBST(LDLIBS) -@@ -162,6 +162,7 @@ fi - - dnl **** Check for underscore on external symbols **** - -+AH_TEMPLATE([NEED_UNDERSCORE_PREFIX], [Define if external symbols need an underscore prefix]) - AC_CACHE_CHECK("whether external symbols need an underscore prefix", - ac_cv_c_extern_prefix, - [saved_libs=$LIBS -@@ -179,68 +180,48 @@ then - AC_DEFINE(NEED_UNDERSCORE_PREFIX) - fi - --dnl **** Check which ANSI integer type is 16 bit -- --AC_CACHE_CHECK( "which ANSI integer type is 16 bit", ac_16bit_type, -- AC_TRY_RUN([ --int main(void) { -- if (sizeof(short)==2) -- return(0); -- else if (sizeof(int)==2) -- return(1); -- else -- return(2); --}], ac_16bit_type="short", ac_16bit_type="int", ac_16bit_type=)) --if test "$ac_16bit_type" = "short" --then -- T1_AA_TYPE16="-DT1_AA_TYPE16=short" -- T1_INT16="short" --else -- T1_AA_TYPE16="-DT1_AA_TYPE16=int" -- T1_INT16="int" -+dnl **** Check which ANSI integer type is 16 bit -+T1_AA_TYPE16="" -+for type in short int; do -+ if test x"`eval echo \\$ac_cv_sizeof_$type`" = "x2"; then -+ T1_AA_TYPE16="-DT1_AA_TYPE16=$type" -+ T1_INT16="$type" -+ break -+ fi -+done -+ -+if test x"$T1_AA_TYPE16" = "x"; then -+ AC_MSG_ERROR("Unable to determine which integer type is 16 bit.") - fi - -- - dnl **** Check which ANSI integer type is 32 bit -- --AC_CACHE_CHECK( "which ANSI integer type is 32 bit", ac_32bit_type, -- AC_TRY_RUN([ --int main(void) { -- if (sizeof(int)==4) -- return(0); -- else if (sizeof(long)==4) -- return(1); -- else -- return(2); --}], ac_32bit_type="int", ac_32bit_type="long", ac_32bit_type=)) --if test "$ac_32bit_type" = "int" --then -- T1_AA_TYPE32="-DT1_AA_TYPE32=int" -- T1_INT32="int" --else -- T1_AA_TYPE32="-DT1_AA_TYPE32=long" -- T1_INT32="long" -+T1_AA_TYPE32="" -+for type in int long; do -+ if test x"`eval echo \\$ac_cv_sizeof_$type`" = "x4"; then -+ T1_AA_TYPE32="-DT1_AA_TYPE32=$type" -+ T1_INT32="$type" -+ break -+ fi -+done -+ -+if test x"$T1_AA_TYPE32" = "x"; then -+ AC_MSG_ERROR("Unable to determine which integer type is 32 bit.") - fi - -- - dnl **** Check which ANSI integer type is 64 bit -- --AC_CACHE_CHECK( "which ANSI integer type is 64 bit", ac_64bit_type, -- AC_TRY_RUN([ --int main(void) { -- if (sizeof(long)==8) -- return(0); -- else -- return(1); --}], ac_64bit_type="long", ac_64bit_type="<none>")) --if test "$ac_64bit_type" = "long" --then -- T1_AA_TYPE64="-DT1_AA_TYPE64=long" --else -- T1_AA_TYPE64= -+T1_AA_TYPE64="" -+for type in long long_long; do -+ if test x"`eval echo \\$ac_cv_sizeof_$type`" = "x8"; then -+ AC_MSG_WARN("$type is 64 bit") -+ T1_AA_TYPE64="-DT1_AA_TYPE64=\"`echo $type|tr '_' ' '`\"" -+ break -+ fi -+done -+ -+if test x"$T1_AA_TYPE64" = "x"; then -+ AC_MSG_ERROR("Unable to determine which integer type is 64 bit.") - fi - -- - CFLAGS="${CFLAGS} -DT1LIB_IDENT=\"\\\"${T1LIB_IDENTIFIER}\\\"\" -DGLOBAL_CONFIG_DIR=\"\\\"${T1LIB_DATA_DIR}\\\"\"" - - dnl **** Check for functions and header files **** diff --git a/external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch b/external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch deleted file mode 100644 index bc2476bf..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch +++ /dev/null @@ -1,58 +0,0 @@ -From cea83003de3ffebde92becd1e599fe3b28f0a7c4 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 6 Mar 2017 23:13:36 -0800 -Subject: [PATCH] t1lib: Fix printf format string errors - -Fix printf formats to use format qualifiers -fixes - -error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Pending - ---- - lib/t1lib/t1subset.c | 2 +- - lib/type1/objects.c | 2 +- - lib/type1/objects.h | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/lib/t1lib/t1subset.c b/lib/t1lib/t1subset.c -index da427b2..e76974f 100644 ---- a/lib/t1lib/t1subset.c -+++ b/lib/t1lib/t1subset.c -@@ -759,7 +759,7 @@ char *T1_SubsetFont( int FontID, - tr_len); - T1_PrintLog( "T1_SubsetFont()", err_warn_msg_buf, - T1LOG_DEBUG); -- l+=sprintf( &(trailerbuf[l]), linebuf); /* contains the PostScript trailer */ -+ l+=sprintf( &(trailerbuf[l]), "%s", linebuf); /* contains the PostScript trailer */ - } - - /* compute size of output file */ -diff --git a/lib/type1/objects.c b/lib/type1/objects.c -index c413a0f..f828e6a 100644 ---- a/lib/type1/objects.c -+++ b/lib/type1/objects.c -@@ -957,7 +957,7 @@ struct xobject *TypeErr(name, obj, expect, ret) /* non-ANSI avoids overly strict - - sprintf(typemsg, "Wrong object type in %s; expected %s, found %s.\n", - name, TypeFmt(expect), TypeFmt(obj->type)); -- IfTrace0(TRUE,typemsg); -+ IfTrace1(TRUE, "%s", typemsg); - - ObjectPostMortem(obj); - -diff --git a/lib/type1/objects.h b/lib/type1/objects.h -index 13cbae7..3a1d337 100644 ---- a/lib/type1/objects.h -+++ b/lib/type1/objects.h -@@ -214,7 +214,7 @@ struct xobject { - /*SHARED*/ - /* NDW: personally, I want to see status and error messages! */ - #define IfTrace0(condition,model) \ -- {if (condition) printf(model);} -+ {if (condition) fputs(model,stdout);} - #define IfTrace1(condition,model,arg0) \ - {if (condition) printf(model,arg0);} - #define IfTrace2(condition,model,arg0,arg1) \ diff --git a/external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/libtool.patch b/external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/libtool.patch deleted file mode 100644 index da54f87a..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/libtool.patch +++ /dev/null @@ -1,144 +0,0 @@ -From bab41f5e1fc1fc809da1371e6a0222e0eb21e5f0 Mon Sep 17 00:00:00 2001 -From: Koen Kooi <koen@dominion.thruhere.net> -Date: Mon, 21 Nov 2011 12:00:54 +0100 -Subject: [PATCH] t1lib: add 5.1.2 - -# -# Patch managed by http://www.holgerschurig.de/patcher.html -# - ---- - Makefile.in | 5 +++-- - examples/Makefile.in | 5 +++-- - lib/Makefile.in | 6 ++++-- - lib/t1lib/Makefile.in | 6 ++++-- - lib/type1/Makefile.in | 6 ++++-- - type1afm/Makefile.in | 6 ++++-- - xglyph/Makefile.in | 6 ++++-- - 7 files changed, 26 insertions(+), 14 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index 29c3468..396c020 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -18,7 +18,8 @@ - # Last modified: 2005-05-01 - # - --SHELL = /bin/sh -+SHELL = @SHELL@ -+LIBTOOL = @LIBTOOL@ - CC = @CC@ - CPP = @CPP@ - CFLAGS = @CFLAGS@ -@@ -149,7 +150,7 @@ distclean: clean - $(RM) examples/Makefile - $(RM) xglyph/Makefile - $(RM) doc/Makefile -- $(RM) libtool -+ $(RM) $(LIBTOOL) - - - # The following two targets are for building and cleaning the python- -diff --git a/examples/Makefile.in b/examples/Makefile.in -index b301db5..7a6a514 100644 ---- a/examples/Makefile.in -+++ b/examples/Makefile.in -@@ -14,9 +14,10 @@ - # Last modified: 2001-04-01 - # - -+top_builddir = @top_builddir@ - --LIBTOOL = ../libtool --SHELL = /bin/sh -+LIBTOOL = @LIBTOOL@ -+SHELL = @SHELL@ - CC = @CC@ - CPP = @CPP@ - CFLAGS = @CFLAGS@ -diff --git a/lib/Makefile.in b/lib/Makefile.in -index 89e5e86..6e0f960 100644 ---- a/lib/Makefile.in -+++ b/lib/Makefile.in -@@ -15,8 +15,10 @@ - # - # Contributions by H.Kakugawa to use libtool! - --LIBTOOL = ../libtool --SHELL = /bin/sh -+top_builddir = @top_builddir@ -+ -+LIBTOOL = @LIBTOOL@ -+SHELL = @SHELL@ - CC = @CC@ - CPP = @CPP@ - CFLAGS = @CFLAGS@ -diff --git a/lib/t1lib/Makefile.in b/lib/t1lib/Makefile.in -index a6c2478..32434b3 100644 ---- a/lib/t1lib/Makefile.in -+++ b/lib/t1lib/Makefile.in -@@ -14,8 +14,10 @@ - # - # Modified by H.Kakugawa to use libtool - --LIBTOOL = ../../libtool --SHELL = /bin/sh -+top_builddir = @top_builddir@ -+ -+LIBTOOL = @LIBTOOL@ -+SHELL = @SHELL@ - CC = @CC@ - CPP = @CPP@ - CFLAGS = @CFLAGS@ -diff --git a/lib/type1/Makefile.in b/lib/type1/Makefile.in -index 241f124..42efa94 100644 ---- a/lib/type1/Makefile.in -+++ b/lib/type1/Makefile.in -@@ -14,8 +14,10 @@ - # - # Modified by H.Kakugawa to use libtool - --LIBTOOL = ../../libtool --SHELL = /bin/sh -+top_builddir = @top_builddir@ -+ -+LIBTOOL = @LIBTOOL@ -+SHELL = @SHELL@ - CC = @CC@ - CPP = @CPP@ - CFLAGS = @CFLAGS@ -diff --git a/type1afm/Makefile.in b/type1afm/Makefile.in -index 61611e1..9b51406 100644 ---- a/type1afm/Makefile.in -+++ b/type1afm/Makefile.in -@@ -15,8 +15,10 @@ - # - # Modified by H.Kakugawa to use libtool - --LIBTOOL = ../libtool --SHELL = /bin/sh -+top_builddir = @top_builddir@ -+ -+LIBTOOL = @LIBTOOL@ -+SHELL = @SHELL@ - CC = @CC@ - CPP = @CPP@ - CFLAGS = @CFLAGS@ -diff --git a/xglyph/Makefile.in b/xglyph/Makefile.in -index 8da9b63..741334c 100644 ---- a/xglyph/Makefile.in -+++ b/xglyph/Makefile.in -@@ -15,8 +15,10 @@ - # - # Modified by H.Kakugawa to use libtool - --LIBTOOL = ../libtool --SHELL = /bin/sh -+top_builddir = @top_builddir@ -+ -+LIBTOOL = @LIBTOOL@ -+SHELL = @SHELL@ - CC = @CC@ - CPP = @CPP@ - CFLAGS = @CFLAGS@ diff --git a/external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib_5.1.2.bb b/external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib_5.1.2.bb deleted file mode 100644 index 826dbda8..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib_5.1.2.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "A Type1 Font Rastering Library" -SECTION = "libs" -DEPENDS = "virtual/libx11 libxaw" - -LICENSE = "LGPLv2 & GPLv2" -LIC_FILES_CHKSUM = "file://LICENSE;md5=8ca43cbc842c2336e835926c2166c28b \ - file://LGPL;md5=6e29c688d912da12b66b73e32b03d812 \ -" - -SRC_URI = "${DEBIAN_MIRROR}/main/t/t1lib/t1lib_${PV}.orig.tar.gz \ - file://configure.patch \ - file://libtool.patch \ - file://format_security.patch" -SRC_URI[md5sum] = "a5629b56b93134377718009df1435f3c" -SRC_URI[sha256sum] = "821328b5054f7890a0d0cd2f52825270705df3641dbd476d58d17e56ed957b59" - -inherit autotools-brokensep distro_features_check -# depends on virtual/libx11 -REQUIRED_DISTRO_FEATURES = "x11" - -# Fix GNU_HASH problem -TARGET_CC_ARCH += "${LDFLAGS}" - -EXTRA_OECONF = "--with-x --without-athena" -EXTRA_OEMAKE = "without_doc" - -FILES_${PN} += " ${datadir}/t1lib/t1lib.config" -FILES_${PN}-doc = "${datadir}/t1lib/doc/t1lib_doc.pdf" - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils/0001-test-ptts-Set-recv-buffer-size-too-max-to-receive-as.patch b/external/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils/0001-test-ptts-Set-recv-buffer-size-too-max-to-receive-as.patch new file mode 100644 index 00000000..39f899cf --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils/0001-test-ptts-Set-recv-buffer-size-too-max-to-receive-as.patch @@ -0,0 +1,66 @@ +From 4e4c8c7a1cca2125e2bf2a67cbab0bdbd78fdb86 Mon Sep 17 00:00:00 2001 +From: He Zhe <zhe.he@windriver.com> +Date: Tue, 30 Jul 2019 13:24:22 +0800 +Subject: [PATCH] ptts: Set recv buffer size too max to receive as many + packets as possible + +Flooding multicast may make the rcv buffer overrun and is considered +premature messages later and thus cause the following error. + +"Ignoring premature msg 16, currently handling 12" + +This patch sets SO_RCVBUF the of socket to max int value to receive as many +packets as possible, and give a hint to user when possible overrun occurs. Note +that the value of SO_RCVBUF will be limited up to min(INT_MAX/2, +sysctl_rmem_max) in kernel. + +Signed-off-by: He Zhe <zhe.he@windriver.com> + +Upstream-Status: Backport + +Signed-off-by: Li Zhou <li.zhou@windriver.com> +--- + ptts/tipc_ts_server.c | 18 ++++++++++++++++-- + 1 file changed, 16 insertions(+), 2 deletions(-) + +diff --git a/ptts/tipc_ts_server.c b/ptts/tipc_ts_server.c +index a286daa..3a2f96f 100644 +--- a/ptts/tipc_ts_server.c ++++ b/ptts/tipc_ts_server.c +@@ -641,8 +641,9 @@ void server_mcast + if (rc < 0) + err("multicast message not received"); + if (msgno != *(int*) buf) { +- dbg1("Ignoring premature msg %u, currently handling %u\n", +- *(int*)buf, msgno); ++ dbg1("Ignoring premature msg %u, currently handling %u\n" ++ "You can enlarge /proc/sys/net/core/rmem_max and try again\n", ++ *(int*)buf, msgno); + continue; + } + rc = recvfrom(sd[i], buf, expected_szs[numSubTest], +@@ -687,8 +688,21 @@ void server_test_multicast(void) + FD_ZERO(&readfds); + + for (i = 0; i < TIPC_MCAST_SOCKETS; i++) { ++ int optval = (int)(~0U >> 1); ++ socklen_t optlen = sizeof(optval); ++ int rc = 0; ++ + sd[i] = createSocketTIPC (SOCK_RDM); + FD_SET(sd[i], &readfds); ++ ++ /* ++ * Flooding multicast may make the rcv buffer overrun and considered premature msg later. ++ * Set SO_RCVBUF to max int value to receive as many packets as possible. ++ * Note that it will be limited up to min(INT_MAX/2, sysctl_rmem_max) in kernel. ++ */ ++ rc = setsockopt(sd[i], SOL_SOCKET, SO_RCVBUF, (const char*)&optval, optlen); ++ if(rc != 0) ++ printf("Failed to set SO_RCVBUF of %d: %s\n", sd[i], strerror(errno)); + } + + server_bindMulticast( 0, 99, sd[0]); +-- +2.17.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb b/external/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb index 54ed043f..637770af 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb @@ -6,14 +6,11 @@ SRC_URI = "git://git.code.sf.net/p/tipc/tipcutils \ file://0001-include-sys-select.h-for-FD_-definitions.patch \ file://0002-replace-non-standard-uint-with-unsigned-int.patch \ file://0001-multicast_blast-tipcc-Fix-struct-type-for-TIPC_GROUP.patch \ + file://0001-test-ptts-Set-recv-buffer-size-too-max-to-receive-as.patch \ " SRCREV = "7ab2211b87414ba240b0b2e4af219c1057c9cf9a" PV = "2.2.0+git${SRCPV}" -DEPENDS="virtual/kernel" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - inherit autotools pkgconfig DEPENDS += "libdaemon" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_2.6.bb b/external/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_2.6.bb index fba5156f..17c2fbab 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_2.6.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/tmux/tmux_2.6.bb @@ -11,6 +11,8 @@ SRC_URI = "https://github.com/tmux/tmux/releases/download/${PV}/tmux-${PV}.tar.g SRC_URI[md5sum] = "d541ff392249f94c4f3635793556f827" SRC_URI[sha256sum] = "b17cd170a94d7b58c0698752e1f4f263ab6dc47425230df7e53a6435cc7cd7e8" +UPSTREAM_CHECK_URI = "https://github.com/tmux/tmux/releases" + inherit autotools pkgconfig PACKAGECONFIG ??= "" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/triggerhappy/triggerhappy_git.bb b/external/meta-openembedded/meta-oe/recipes-extended/triggerhappy/triggerhappy_git.bb new file mode 100644 index 00000000..38ce4f55 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/triggerhappy/triggerhappy_git.bb @@ -0,0 +1,47 @@ +SUMMARY = "A lightweight hotkey daemon" +HOMEPAGE = "https://github.com/wertarbyte/triggerhappy" + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +# matches debian/0.5.0-1 tag +SRCREV = "44a173195986d0d853316cb02a58785ded66c12b" +PV = "0.5.0+git${SRCPV}" +SRC_URI = "git://github.com/wertarbyte/${BPN}.git;branch=debian" + +S = "${WORKDIR}/git" + +inherit autotools-brokensep pkgconfig perlnative update-rc.d systemd + +PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}" +PACKAGECONFIG[systemd] = ",,systemd" + +INITSCRIPT_NAME = "triggerhappy" +INITSCRIPT_PARAMS = "defaults" +SYSTEMD_SERVICE_${PN} = "triggerhappy.service triggerhappy.socket" + +FILES_${PN} = "\ + ${sbindir}/thd \ + ${sbindir}/th-cmd \ + ${sysconfdir}/triggerhappy/triggers.d \ + ${nonarch_base_libdir}/udev/rules.d/80-triggerhappy.rules \ + ${sysconfdir}/init.d/triggerhappy \ + ${systemd_unitdir}/system \ +" +CONFFILES_${PN} = "${sysconfdir}/udev/rules.d/80-triggerhappy.rules" + +do_install_append() { + install -d ${D}${sysconfdir}/triggerhappy/triggers.d + + install -d ${D}${nonarch_base_libdir}/udev/rules.d + install -m 0644 ${S}/udev/triggerhappy-udev.rules ${D}${nonarch_base_libdir}/udev/rules.d/80-triggerhappy.rules + + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${S}/debian/init.d ${D}${sysconfdir}/init.d/triggerhappy + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}/${systemd_unitdir}/system + install -m 0644 ${S}/systemd/triggerhappy.socket ${D}${systemd_unitdir}/system + install -m 0644 ${S}/systemd/triggerhappy.service ${D}${systemd_unitdir}/system + fi +} diff --git a/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-CMakeLists.txt-Use-SWIG_SUPPORT_FILES-to-find-the-li.patch b/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-CMakeLists.txt-Use-SWIG_SUPPORT_FILES-to-find-the-li.patch new file mode 100644 index 00000000..4b9a195e --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-CMakeLists.txt-Use-SWIG_SUPPORT_FILES-to-find-the-li.patch @@ -0,0 +1,38 @@ +From 3707f467f9a26a7df3d41385023b43c3d08911d2 Mon Sep 17 00:00:00 2001 +From: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> +Date: Tue, 12 Feb 2019 17:46:52 -0800 +Subject: [PATCH][v3] CMakeLists.txt: Use SWIG_SUPPORT_FILES to find the list + of generated files for cmake version 3.12 or higher + +Use SWIG_SUPPORT_FILES to find the list of python files generated by +CMake Swig module and install those files. This should be applicable to +cmake version 3.12 or higher + +Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> +--- + src/CMakeLists.txt | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index e19cda2..b565814 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -337,8 +337,14 @@ macro(_upm_swig_python) + OUTPUT_NAME _pyupm_${libname} + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_PYTHON_BINARY_DIR}) + ++ if (CMAKE_VERSION VERSION_LESS "3.12") ++ set(support_files ${swig_extra_generated_files}) ++ else() ++ get_property(support_files TARGET _${python_wrapper_name} PROPERTY SWIG_SUPPORT_FILES) ++ endif() ++ + # Install .py's to python packages directory/upm +- install (FILES ${swig_extra_generated_files} ++ install (FILES ${support_files} + DESTINATION ${PYTHON_PACKAGES_PATH}/upm + COMPONENT ${CMAKE_PROJECT_NAME}-python${PYTHON_VERSION_MAJOR}) + +-- +2.7.4 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-Replace-strncpy-with-memcpy.patch b/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-Replace-strncpy-with-memcpy.patch deleted file mode 100644 index 4b17087e..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-Replace-strncpy-with-memcpy.patch +++ /dev/null @@ -1,49 +0,0 @@ -From d314f26e024aaf15bf4ab22ceb98501148d0eac8 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 7 May 2018 19:53:33 -0700 -Subject: [PATCH] Replace strncpy with memcpy - -gcc8 detects that strncpy is overwiritng the null terminating character -the source strings are already initialized to 0 so memcpy would do the same -job - -Fixes -rn2903.c:153:5: error: 'strncpy' output may be truncated copying 16 bytes from a string of length 511 [-Werror=stringop-truncation] - strncpy(dev->hardware_eui, dev->resp_data, RN2903_MAX_HEX_EUI64); - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/ecezo/ecezo.c | 2 +- - src/rn2903/rn2903.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/ecezo/ecezo.c b/src/ecezo/ecezo.c -index 6a195fc1..56c6dab3 100644 ---- a/src/ecezo/ecezo.c -+++ b/src/ecezo/ecezo.c -@@ -488,7 +488,7 @@ int ecezo_send_command(const ecezo_context dev, char *cmd, char *buffer, - // our write buffer - char writeBuffer[ECEZO_MAX_BUFFER_LEN]; - -- strncpy(writeBuffer, cmd, ECEZO_MAX_BUFFER_LEN); -+ memcpy(writeBuffer, cmd, ECEZO_MAX_BUFFER_LEN-1); - writeBuffer[ECEZO_MAX_BUFFER_LEN - 1] = 0; - - int writelen = strlen(writeBuffer); -diff --git a/src/rn2903/rn2903.c b/src/rn2903/rn2903.c -index f30a33ae..01a011da 100644 ---- a/src/rn2903/rn2903.c -+++ b/src/rn2903/rn2903.c -@@ -150,7 +150,7 @@ static rn2903_context _rn2903_postinit(rn2903_context dev, - rn2903_close(dev); - return NULL; - } -- strncpy(dev->hardware_eui, dev->resp_data, RN2903_MAX_HEX_EUI64); -+ memcpy(dev->hardware_eui, dev->resp_data, RN2903_MAX_HEX_EUI64); - - return dev; - } --- -2.17.0 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-Use-stdint-types.patch b/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-Use-stdint-types.patch new file mode 100644 index 00000000..40856fcf --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-Use-stdint-types.patch @@ -0,0 +1,139 @@ +From 5a1e731d71d577f56a2c013e4a75a8e90188e63b Mon Sep 17 00:00:00 2001 +From: Paul Eggleton <paul.eggleton@linux.intel.com> +Date: Tue, 9 Jul 2019 05:21:59 -0700 +Subject: [PATCH] Use stdint types + +Fixes compilation with musl. + +Upstream-Status: Pending + +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> +--- + src/bma250e/bma250e.cxx | 16 ++++++++-------- + src/bmg160/bmg160.cxx | 10 +++++----- + src/bmi160/bosch_bmi160.h | 2 +- + src/bmm150/bmm150.cxx | 8 ++++---- + 4 files changed, 18 insertions(+), 18 deletions(-) + +diff --git a/src/bma250e/bma250e.cxx b/src/bma250e/bma250e.cxx +index a8792782..1b3ecdd8 100644 +--- a/src/bma250e/bma250e.cxx ++++ b/src/bma250e/bma250e.cxx +@@ -195,35 +195,35 @@ BMA250E::BMA250E(std::string initStr) : mraaIo(initStr) + fifoConfig(mode, axes); + } + if(tok.substr(0, 20) == "setInterruptEnable0:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0); + setInterruptEnable0(bits); + } + if(tok.substr(0, 20) == "setInterruptEnable1:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0); + setInterruptEnable1(bits); + } + if(tok.substr(0, 20) == "setInterruptEnable2:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0); + setInterruptEnable2(bits); + } + if(tok.substr(0, 17) == "setInterruptMap0:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0); + setInterruptMap0(bits); + } + if(tok.substr(0, 17) == "setInterruptMap1:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0); + setInterruptMap1(bits); + } + if(tok.substr(0, 17) == "setInterruptMap2:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0); + setInterruptMap2(bits); + } + if(tok.substr(0, 16) == "setInterruptSrc:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(16), nullptr, 0); + setInterruptSrc(bits); + } + if(tok.substr(0, 26) == "setInterruptOutputControl:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(26), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(26), nullptr, 0); + setInterruptOutputControl(bits); + } + if(tok.substr(0, 26) == "setInterruptLatchBehavior:") { +diff --git a/src/bmg160/bmg160.cxx b/src/bmg160/bmg160.cxx +index 1a0939f8..2438c399 100644 +--- a/src/bmg160/bmg160.cxx ++++ b/src/bmg160/bmg160.cxx +@@ -173,23 +173,23 @@ BMG160::BMG160(std::string initStr) : mraaIo(initStr) + fifoConfig(mode, axes); + } + if(tok.substr(0, 20) == "setInterruptEnable0:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0); + setInterruptEnable0(bits); + } + if(tok.substr(0, 17) == "setInterruptMap0:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0); + setInterruptMap0(bits); + } + if(tok.substr(0, 17) == "setInterruptMap1:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0); + setInterruptMap1(bits); + } + if(tok.substr(0, 16) == "setInterruptSrc:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(16), nullptr, 0); + setInterruptSrc(bits); + } + if(tok.substr(0, 26) == "setInterruptOutputControl:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(26), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(26), nullptr, 0); + setInterruptOutputControl(bits); + } + if(tok.substr(0, 26) == "setInterruptLatchBehavior:") { +diff --git a/src/bmi160/bosch_bmi160.h b/src/bmi160/bosch_bmi160.h +index 87ca2249..cd9efe6f 100644 +--- a/src/bmi160/bosch_bmi160.h ++++ b/src/bmi160/bosch_bmi160.h +@@ -81,7 +81,7 @@ typedef int16_t s16;/**< used for signed 16bit */ + typedef int32_t s32;/**< used for signed 32bit */ + typedef int64_t s64;/**< used for signed 64bit */ + +-typedef u_int8_t u8;/**< used for unsigned 8bit */ ++typedef uint8_t u8;/**< used for unsigned 8bit */ + typedef u_int16_t u16;/**< used for unsigned 16bit */ + typedef u_int32_t u32;/**< used for unsigned 32bit */ + typedef u_int64_t u64;/**< used for unsigned 64bit */ +diff --git a/src/bmm150/bmm150.cxx b/src/bmm150/bmm150.cxx +index 234ebf92..02436788 100644 +--- a/src/bmm150/bmm150.cxx ++++ b/src/bmm150/bmm150.cxx +@@ -170,19 +170,19 @@ BMM150::BMM150(std::string initStr) : mraaIo(initStr) + setOpmode(opmode); + } + if(tok.substr(0, 19) == "setInterruptEnable:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(19), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(19), nullptr, 0); + setInterruptEnable(bits); + } + if(tok.substr(0, 19) == "setInterruptConfig:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(19), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(19), nullptr, 0); + setInterruptConfig(bits); + } + if(tok.substr(0, 17) == "setRepetitionsXY:") { +- u_int8_t reps = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0); ++ uint8_t reps = (uint8_t)std::stoul(tok.substr(17), nullptr, 0); + setRepetitionsXY(reps); + } + if(tok.substr(0, 16) == "setRepetitionsZ:") { +- u_int8_t reps = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0); ++ uint8_t reps = (uint8_t)std::stoul(tok.substr(16), nullptr, 0); + setRepetitionsZ(reps); + } + if(tok.substr(0, 14) == "setPresetMode:") { diff --git a/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-cmake-Disable-Wno-misleading-indentation-with-clang-.patch b/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-cmake-Disable-Wno-misleading-indentation-with-clang-.patch new file mode 100644 index 00000000..68b73bc2 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-cmake-Disable-Wno-misleading-indentation-with-clang-.patch @@ -0,0 +1,33 @@ +From d41e2bef1c39dcbc4896b1dd7ab168da530672b5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 30 Dec 2019 13:33:39 -0800 +Subject: [PATCH] cmake: Disable -Wno-misleading-indentation with clang-10 onwards + +clang also introduced this warning now + +Upstream-Status: Submitted [https://github.com/eclipse/upm/pull/693] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 069e4902..47c7f4c3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -99,6 +99,11 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_ + list (APPEND C_CXX_WARNING_FLAGS -Wno-misleading-indentation) + endif () + ++# clang-10 added -Wmisleading-indentation as well, skipp it too ++if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "9") ++ list (APPEND C_CXX_WARNING_FLAGS -Wno-misleading-indentation) ++endif () ++ + # Warnings as errors? + if (WERROR) + list (APPEND C_CXX_WARNING_FLAGS -Werror) +-- +2.24.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-cmake-Disable-using-Wno-maybe-uninitialized.patch b/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-cmake-Disable-using-Wno-maybe-uninitialized.patch new file mode 100644 index 00000000..2f581855 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-cmake-Disable-using-Wno-maybe-uninitialized.patch @@ -0,0 +1,37 @@ +From 169f62770f63a43b15d4d4c82336fd57c8467cfe Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 4 Apr 2020 21:43:51 -0700 +Subject: [PATCH] cmake: Disable using -Wno-maybe-uninitialized + +This warning causes clang builds to fail because this is not a +recognised warning with clang + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -6,7 +6,6 @@ + set (SWIG_CXX_DISABLE_WARNINGS -Wno-error + -Wno-delete-non-virtual-dtor + -Wno-unused-function +- -Wno-maybe-uninitialized + -Wno-strict-aliasing) + + # If building under android, make sure swig gets an ANDROID flag +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -115,8 +115,7 @@ endif (WERROR) + upm_add_compile_flags(C ${C_CXX_WARNING_FLAGS} + -Winit-self + -Wimplicit +- -Wsign-compare +- -Wmissing-parameter-type) ++ -Wsign-compare) + + # Set CXX compiler warning flags at top-level scope and emit a warning about + # unsupported flags diff --git a/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-include-sys-types.h-for-uint-definition.patch b/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-include-sys-types.h-for-uint-definition.patch deleted file mode 100644 index a0a47411..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-include-sys-types.h-for-uint-definition.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 48a580bd402cf6a3ee9e42013653219bfeb3caf6 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -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 <raj.khem@gmail.com> ---- -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> diff --git a/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-initialize-local-variables-before-use.patch b/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-initialize-local-variables-before-use.patch new file mode 100644 index 00000000..f9fae164 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-initialize-local-variables-before-use.patch @@ -0,0 +1,57 @@ +From cce8be3966b602cf7e20d559e50fcf493b9b42cc Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 23 Dec 2019 18:13:21 -0800 +Subject: [PATCH] initialize local variables before use + +fixes +error: 'ctrl_reg2_data' may be used uninitialized in this function [-Werror=maybe-uninitialized] + +Upstream-Status: Submitted [https://github.com/eclipse/upm/pull/693] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/kxtj3/kxtj3.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/kxtj3/kxtj3.c b/src/kxtj3/kxtj3.c +index a6f3c4f8..050ae585 100755 +--- a/src/kxtj3/kxtj3.c ++++ b/src/kxtj3/kxtj3.c +@@ -715,7 +715,7 @@ upm_result_t kxtj3_sensor_software_reset(const kxtj3_context dev) + if (kxtj3_set_bit_on(dev, KXTJ3_CTRL_REG2, KXTJ3_CTRL_REG2_SRST) != UPM_SUCCESS) + return UPM_ERROR_OPERATION_FAILED; + +- uint8_t ctrl_reg2_data; ++ uint8_t ctrl_reg2_data = 0; + kxtj3_read_register(dev, KXTJ3_CTRL_REG2, &ctrl_reg2_data); + + uint8_t srst_counter = 0; +@@ -824,7 +824,7 @@ upm_result_t kxtj3_enable_interrupt_pin(const kxtj3_context dev, KXTJ3_INTERRUPT + KXTJ3_INTERRUPT_RESPONSE_T response_type) + { + assert(dev != NULL); +- uint8_t int_reg_value; ++ uint8_t int_reg_value = 0; + kxtj3_read_register(dev, KXTJ3_INT_CTRL_REG1, &int_reg_value); + + if (polarity) +@@ -865,7 +865,7 @@ upm_result_t kxtj3_set_interrupt_response(const kxtj3_context dev, KXTJ3_INTERRU + bool kxtj3_get_interrupt_status(const kxtj3_context dev) + { + assert(dev != NULL); +- uint8_t status_reg_value; ++ uint8_t status_reg_value = 0; + kxtj3_read_register(dev, KXTJ3_STATUS_REG, &status_reg_value); + if (!(status_reg_value & KXTJ3_STATUS_REG_INT)) + return false; +@@ -955,7 +955,7 @@ kxtj3_wakeup_axes kxtj3_get_wakeup_axis_and_direction(kxtj3_context dev) + { + assert(dev != NULL); + +- uint8_t int_source2_value; ++ uint8_t int_source2_value = 0; + kxtj3_read_register(dev, KXTJ3_INT_SOURCE2, &int_source2_value); + + kxtj3_wakeup_axes wakeup_axis; +-- +2.24.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-nmea_gps-Link-with-latomic.patch b/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-nmea_gps-Link-with-latomic.patch new file mode 100644 index 00000000..c16b8dbc --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/upm/upm/0001-nmea_gps-Link-with-latomic.patch @@ -0,0 +1,27 @@ +From 996d37fc0b7177ee57788399b9140032d5de2765 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 18 Nov 2019 15:50:02 -0800 +Subject: [PATCH] nmea_gps: Link with latomic + +clang/x86 ends up with missing symbols for atomics due to atomic<double> +with libstdc++, it works ok with libc++ + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/nmea_gps/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/nmea_gps/CMakeLists.txt b/src/nmea_gps/CMakeLists.txt +index b3fb6591..5280bfed 100644 +--- a/src/nmea_gps/CMakeLists.txt ++++ b/src/nmea_gps/CMakeLists.txt +@@ -6,4 +6,4 @@ upm_mixed_module_init (NAME nmea_gps + CPP_SRC nmea_gps.cxx + FTI_SRC nmea_gps_fti.c + CPP_WRAPS_C +- REQUIRES mraa utilities-c ${CMAKE_THREAD_LIBS_INIT}) ++ REQUIRES mraa utilities-c atomic ${CMAKE_THREAD_LIBS_INIT}) +-- +2.24.0 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/upm/upm_git.bb b/external/meta-openembedded/meta-oe/recipes-extended/upm/upm_git.bb index babe5f48..5b3585c1 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/upm/upm_git.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/upm/upm_git.bb @@ -7,20 +7,27 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=66493d54e65bfc12c7983ff2e884f37f" DEPENDS = "libjpeg-turbo mraa" -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 \ - file://0001-include-sys-types.h-for-uint-definition.patch \ +SRCREV = "5cf20df96c6b35c19d5b871ba4e319e96b4df72d" +PV = "2.0.0+git${SRCPV}" + +SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=http \ + file://0001-CMakeLists.txt-Use-SWIG_SUPPORT_FILES-to-find-the-li.patch \ + file://0001-Use-stdint-types.patch \ + file://0001-initialize-local-variables-before-use.patch \ + file://0001-cmake-Disable-Wno-misleading-indentation-with-clang-.patch \ + file://0001-cmake-Disable-using-Wno-maybe-uninitialized.patch \ " +SRC_URI_append_toolchain-clang_x86 = " file://0001-nmea_gps-Link-with-latomic.patch " + S = "${WORKDIR}/git" # Depends on mraa which only supports x86 and ARM for now COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" -inherit distutils3-base cmake +inherit distutils3-base cmake pkgconfig + +EXTRA_OECMAKE += "-UPYTHON_EXECUTABLE -DWERROR=off" # override this in local.conf to get needed bindings. # BINDINGS_pn-upm="python" @@ -36,7 +43,7 @@ BINDINGS_armv5 ??= "python" PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \ ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}" -PACKAGECONFIG[python] = "-DBUILDSWIGPYTHON=ON, -DBUILDSWIGPYTHON=OFF, swig-native ${PYTHON_PN}," +PACKAGECONFIG[python] = "-DBUILDSWIGPYTHON=ON -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}, -DBUILDSWIGPYTHON=OFF, swig-native ${PYTHON_PN}," PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native," FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/volume_key/volume-key_0.3.11.bb b/external/meta-openembedded/meta-oe/recipes-extended/volume_key/volume-key_0.3.12.bb index c41b20c4..e036f714 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/volume_key/volume-key_0.3.11.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/volume_key/volume-key_0.3.12.bb @@ -10,8 +10,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "https://releases.pagure.org/volume_key/volume_key-${PV}.tar.xz \ " -SRC_URI[md5sum] = "30df56c7743eb7c965293b3d61194232" -SRC_URI[sha256sum] = "e6b279c25ae477b555f938db2e41818f90c8cde942b0eec92f70b6c772095f6d" +SRC_URI[md5sum] = "200591290173c3ea71528411838f9080" +SRC_URI[sha256sum] = "6ca3748fc1dad22c450bbf6601d4e706cb11c5e662d11bb4aeb473a9cd77309b" SRCNAME = "volume_key" S = "${WORKDIR}/${SRCNAME}-${PV}" @@ -27,8 +27,12 @@ DEPENDS += " \ swig-native \ " -RDEPENDS_python3-${PN} += "${PN}" +PACKAGECONFIG ??= "python3" +PACKAGECONFIG[python3] = "--with-python3,--without-python3,python3,python3" -PACKAGES += "python3-${PN}" -FILES_python3-${PN} = "${PYTHON_SITEPACKAGES_DIR}/*" +EXTRA_OECONF = "--without-python" +RDEPENDS_python3-${BPN} += "${PN}" + +PACKAGES += "python3-${BPN}" +FILES_python3-${BPN} = "${PYTHON_SITEPACKAGES_DIR}/*" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/wipe/wipe_git.bb b/external/meta-openembedded/meta-oe/recipes-extended/wipe/wipe_0.24.bb index 9a810162..831d514a 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/wipe/wipe_git.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/wipe/wipe_0.24.bb @@ -13,8 +13,7 @@ SRC_URI = "git://github.com/berke/wipe.git;branch=master \ file://support-cross-compile-for-linux.patch \ file://makefile-add-ldflags.patch \ " -SRCREV = "d9c100c9cd0b1cbbe4359e4d6c9a035d11e7597c" -PV = "0.23+git${SRCPV}" +SRCREV = "796b62293e007546e051619bd03f5ba338ef28e5" S = "${WORKDIR}/git" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/wxwidgets/wxwidgets_git.bb b/external/meta-openembedded/meta-oe/recipes-extended/wxwidgets/wxwidgets_git.bb new file mode 100644 index 00000000..06337b79 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/wxwidgets/wxwidgets_git.bb @@ -0,0 +1,82 @@ +SUMMARY = "Cross-Plattform GUI Library" +DESCRIPTIOM = "wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls." +HOMEPAGE = "https://www.wxwidgets.org/" +BUGTRACKER = "https://trac.wxwidgets.org/" + +# wxWidgets licence is a modified version of LGPL explicitly allowing not +# distributing the sources of an application using the library even in the +# case of static linking. +LICENSE = "wxWidgets" +LIC_FILES_CHKSUM = "file://docs/licence.txt;md5=981f50a934828620b08f44d75db557c6" + +inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt', 'cmake_qt5', 'cmake', d)} +inherit features_check lib_package + +# All toolkit-configs except 'no_gui' require x11 explicitly (see toolkit.cmake) +REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'no_gui', '', 'x11', d)}" + +DEPENDS += " \ + jpeg \ + libpng \ + tiff \ +" + +SRC_URI = "git://github.com/wxWidgets/wxWidgets.git" +PV = "3.1.3" +SRCREV= "8a40d23b27ed1c80b5a2ca9f7e8461df4fbc1a31" +S = "${WORKDIR}/git" + +# These can be either 'builtin' or 'sys' and builtin means cloned soures are +# build. So these cannot be PACKAGECONFIGs and let's use libs where we can (see +# DEPENDS) +EXTRA_OECMAKE += " \ + -DwxUSE_LIBJPEG=sys \ + -DwxUSE_LIBPNG=sys \ + -DwxUSE_LIBTIFF=sys \ + -DwxUSE_REGEX=builtin \ +" +EXTRA_OECMAKE_append_libc-musl = " \ + -DHAVE_LOCALE_T=OFF \ +" + +PACKAGECONFIG ?= "gtk" + +# Note on toolkit-PACKAGECONFIGs: select exactly one of 'no_gui' / 'gtk' / 'qt' +PACKAGECONFIG[no_gui] = "-DwxUSE_GUI=OFF,,,,,qt gtk" +PACKAGECONFIG[gtk] = "-DwxBUILD_TOOLKIT=gtk3 -DwxUSE_GUI=ON,,gtk+3,,,no_gui qt" +PACKAGECONFIG[qt] = "-DwxBUILD_TOOLKIT=qt -DwxUSE_GUI=ON,,qtbase,,,no_gui gtk" +python () { + pkgconfig = d.getVar('PACKAGECONFIG') + if (not 'no_gui' in pkgconfig) and (not 'gtk' in pkgconfig) and (not 'qt' in pkgconfig): + bb.error("PACKAGECONFIG must select a toolkit. Add one of no_gui / gtk / qt!") +} + +# Notes on other PACKAGECONFIGs: +# * 'no_gui' overrides some configs below so they are marked as conflicting +# with 'no_gui' to avoid surprises +# * qt+gstreamer is broken due to incorrect references on glib-2.0 -> mark +# as conflicting +# * wxUSE_LIBGNOMEVFS is for gtk2 (see init.cmake) which we don't support +# -> no gvfs PACKAGECONFIG +# * libmspack is in meta-security +PACKAGECONFIG[gstreamer] = "-DwxUSE_MEDIACTRL=ON,-DwxUSE_MEDIACTRL=OFF,gstreamer1.0-plugins-base,,,no_gui qt" +PACKAGECONFIG[libsecret] = "-DwxUSE_SECRETSTORE=ON,-DwxUSE_SECRETSTORE=OFF,libsecret,,,no_gui" +PACKAGECONFIG[lzma] = "-DwxUSE_LIBLZMA=ON,-DwxUSE_LIBLZMA=OFF,xz" +PACKAGECONFIG[mspack] = "-DwxUSE_LIBMSPACK=ON,-DwxUSE_LIBMSPACK=OFF,libmspack" +PACKAGECONFIG[sdl_audio] = "-DwxUSE_LIBSDL=ON,-DwxUSE_LIBSDL=OFF,libsdl2" +PACKAGECONFIG[webkit] = "-DwxUSE_WEBVIEW_WEBKIT=ON,-DwxUSE_WEBVIEW_WEBKIT=OFF,webkitgtk,,,no_gui" + +do_install_append() { + # do not ship bindir if empty + rmdir --ignore-fail-on-non-empty ${D}${bindir} +} + +# lib names are not canonical +FILES_SOLIBSDEV = "" + +FILES_${PN} += " \ + ${libdir}/libwx_*.so \ + ${libdir}/wx/ \ +" + +FILES_${PN}-dev += "${libdir}/wx/include/" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/zlog/zlog/0001-event.c-Cast-pthread_t-to-unsigned-long-instead-of-u.patch b/external/meta-openembedded/meta-oe/recipes-extended/zlog/zlog/0001-event.c-Cast-pthread_t-to-unsigned-long-instead-of-u.patch deleted file mode 100644 index 71a98910..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/zlog/zlog/0001-event.c-Cast-pthread_t-to-unsigned-long-instead-of-u.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b97f62fdf3b78eb5cfcb3a1b12c6fd62f735717b Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 15 Jul 2017 09:29:33 -0700 -Subject: [PATCH] event.c: Cast pthread_t to unsigned long instead of unsigned - int - -On 64bit machines it ends up in errors - -event.c:85:67: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] - a_event->tid_hex_str_len = sprintf(a_event->tid_hex_str, "0x%x", (unsigned int)a_event->tid); - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/event.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/event.c b/src/event.c -index 8f988b5..c632c33 100644 ---- a/src/event.c -+++ b/src/event.c -@@ -82,7 +82,7 @@ zlog_event_t *zlog_event_new(int time_cache_count) - a_event->tid = pthread_self(); - - a_event->tid_str_len = sprintf(a_event->tid_str, "%lu", (unsigned long)a_event->tid); -- a_event->tid_hex_str_len = sprintf(a_event->tid_hex_str, "0x%x", (unsigned int)a_event->tid); -+ a_event->tid_hex_str_len = sprintf(a_event->tid_hex_str, "0x%lu", (unsigned long)a_event->tid); - - //zlog_event_profile(a_event, ZC_DEBUG); - return a_event; --- -2.13.3 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/zlog/zlog_git.bb b/external/meta-openembedded/meta-oe/recipes-extended/zlog/zlog_1.2.14.bb index de751645..b94664c3 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/zlog/zlog_git.bb +++ b/external/meta-openembedded/meta-oe/recipes-extended/zlog/zlog_1.2.14.bb @@ -3,12 +3,8 @@ HOMEPAGE = "https://github.com/HardySimpson/zlog" LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" -PV = "1.2.12+git${SRCPV}" - -SRCREV = "13904dab2878aa2654d0c20fb8600a3dc5f2dd68" -SRC_URI = "git://github.com/HardySimpson/zlog \ - file://0001-event.c-Cast-pthread_t-to-unsigned-long-instead-of-u.patch \ - " +SRCREV = "8fc78c3c65cb705953a2f3f9a813c3ef3c8b2270" +SRC_URI = "git://github.com/HardySimpson/zlog" S = "${WORKDIR}/git" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/zram/zram/dev-zram0.swap b/external/meta-openembedded/meta-oe/recipes-extended/zram/zram/dev-zram0.swap new file mode 100644 index 00000000..05eae7ee --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram-swap-deinit b/external/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram-swap-deinit new file mode 100755 index 00000000..46248c40 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram-swap-init b/external/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram-swap-init new file mode 100755 index 00000000..0643dbca --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram-swap.service b/external/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram-swap.service new file mode 100644 index 00000000..a4dc9514 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram.service b/external/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram.service deleted file mode 100644 index 4a19367d..00000000 --- a/external/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/external/meta-openembedded/meta-oe/recipes-extended/zram/zram/zramstop b/external/meta-openembedded/meta-oe/recipes-extended/zram/zram/zramstop new file mode 100644 index 00000000..07777978 --- /dev/null +++ b/external/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/external/meta-openembedded/meta-oe/recipes-extended/zram/zram_0.1.bb b/external/meta-openembedded/meta-oe/recipes-extended/zram/zram_0.1.bb deleted file mode 100644 index dfd75e71..00000000 --- a/external/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/external/meta-openembedded/meta-oe/recipes-extended/zram/zram_0.2.bb b/external/meta-openembedded/meta-oe/recipes-extended/zram/zram_0.2.bb new file mode 100644 index 00000000..98c47af7 --- /dev/null +++ b/external/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" diff --git a/external/meta-openembedded/meta-oe/recipes-extended/zstd/zstd/0001-Fix-legacy-build-after-2103.patch b/external/meta-openembedded/meta-oe/recipes-extended/zstd/zstd/0001-Fix-legacy-build-after-2103.patch new file mode 100644 index 00000000..c701554b --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/zstd/zstd/0001-Fix-legacy-build-after-2103.patch @@ -0,0 +1,27 @@ +From 93cec0c1d6d0be8dd3a9d01d3e7f2099f1728df7 Mon Sep 17 00:00:00 2001 +From: Orivej Desh <orivej@gmx.fr> +Date: Fri, 22 May 2020 12:48:02 +0000 +Subject: [PATCH] Fix legacy build after #2103 + +Upstream-Status: Backport +Signed-of-by: Alex Kiernan <alex.kiernan@gmail.com> +--- + lib/legacy/zstd_v04.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/legacy/zstd_v04.c b/lib/legacy/zstd_v04.c +index 56bf45222498..19fda8980abf 100644 +--- a/lib/legacy/zstd_v04.c ++++ b/lib/legacy/zstd_v04.c +@@ -74,7 +74,7 @@ extern "C" { + /*-************************************* + * Debug + ***************************************/ +-#include "debug.h" ++#include "../common/debug.h" + #ifndef assert + # define assert(condition) ((void)0) + #endif +-- +2.17.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/zstd/zstd_1.4.5.bb b/external/meta-openembedded/meta-oe/recipes-extended/zstd/zstd_1.4.5.bb new file mode 100644 index 00000000..cd0b471e --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/zstd/zstd_1.4.5.bb @@ -0,0 +1,37 @@ +SUMMARY = "Zstandard - Fast real-time compression algorithm" +DESCRIPTION = "Zstandard is a fast lossless compression algorithm, targeting \ +real-time compression scenarios at zlib-level and better compression ratios. \ +It's backed by a very fast entropy stage, provided by Huff0 and FSE library." +HOMEPAGE = "http://www.zstd.net/" +SECTION = "console/utils" + +LICENSE = "BSD-3-Clause & GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c7f0b161edbe52f5f345a3d1311d0b32 \ + file://COPYING;md5=39bba7d2cf0ba1036f2a6e2be52fe3f0" + +SRC_URI = "git://github.com/facebook/zstd.git;nobranch=1 \ + file://0001-Fix-legacy-build-after-2103.patch \ + " + +SRCREV = "b706286adbba780006a47ef92df0ad7a785666b6" +UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" + +S = "${WORKDIR}/git" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[lz4] = "HAVE_LZ4=1,HAVE_LZ4=0,lz4" +PACKAGECONFIG[lzma] = "HAVE_LZMA=1,HAVE_LZMA=0,xz" +PACKAGECONFIG[zlib] = "HAVE_ZLIB=1,HAVE_ZLIB=0,zlib" + +# See programs/README.md for how to use this +ZSTD_LEGACY_SUPPORT ??= "4" + +do_compile () { + oe_runmake ${PACKAGECONFIG_CONFARGS} ZSTD_LEGACY_SUPPORT=${ZSTD_LEGACY_SUPPORT} +} + +do_install () { + oe_runmake install 'DESTDIR=${D}' +} + +BBCLASSEXTEND = "native nativesdk" |