From 1ac5c704bb4b7fd72d9e382ccf23f4d186da0f86 Mon Sep 17 00:00:00 2001 From: Stephane Desneux Date: Thu, 23 Jun 2016 16:00:59 +0000 Subject: add layer meta-app-framework meta-app-framework is a layer containing the AGL App Framework recipes 4 new layers are added for application framework: * meta-intel-iot-security/meta-security-smack * meta-intel-iot-security/meta-security-framework * meta-agl/meta-agl-security * meta-agl/meta-app-framework Configuration file changes to support AppFw: * activation of Smack and Cynara * modify the tar command to be used to support Smack extended attributes Change-Id: Idc8abdc8869787feb4b534ee45bf7b5d3dde3632 Signed-off-by: Stephane Desneux --- .../libcap/removing-capability-enforcement.patch | 79 ++++++++++++++ .../recipes-support/libcap/libcap_%.bbappend | 5 + .../libmicrohttpd/allows-upgrade.patch | 14 +++ .../libmicrohttpd/libmicrohttpd_0.9.48.bb | 27 +++++ .../libmicrohttpd/libmicrohttpd_0.9.48.bbappend | 5 + .../recipes-support/libzip/libzip_1.1.1.bb | 32 ++++++ ...quire-libxslt-in-.pc-files-when-necessary.patch | 115 +++++++++++++++++++++ .../recipes-support/xmlsec1/xmlsec1_1.%.bbappend | 4 + 8 files changed, 281 insertions(+) create mode 100644 meta-app-framework/recipes-support/libcap/libcap/removing-capability-enforcement.patch create mode 100644 meta-app-framework/recipes-support/libcap/libcap_%.bbappend create mode 100644 meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd/allows-upgrade.patch create mode 100644 meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.48.bb create mode 100644 meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.48.bbappend create mode 100644 meta-app-framework/recipes-support/libzip/libzip_1.1.1.bb create mode 100644 meta-app-framework/recipes-support/xmlsec1/xmlsec1/Only-require-libxslt-in-.pc-files-when-necessary.patch create mode 100644 meta-app-framework/recipes-support/xmlsec1/xmlsec1_1.%.bbappend (limited to 'meta-app-framework/recipes-support') diff --git a/meta-app-framework/recipes-support/libcap/libcap/removing-capability-enforcement.patch b/meta-app-framework/recipes-support/libcap/libcap/removing-capability-enforcement.patch new file mode 100644 index 000000000..fd01c19e9 --- /dev/null +++ b/meta-app-framework/recipes-support/libcap/libcap/removing-capability-enforcement.patch @@ -0,0 +1,79 @@ +From c34b2725817d4fd1fd6878bbb16617cb9e3e3a70 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Fri, 22 Jan 2016 16:23:59 +0100 +Subject: [PATCH] removing capability enforcement + +Change-Id: Idb724192ceab176a611bbed45c0ebc9c8eb5dd30 +--- + progs/setcap.c | 43 ------------------------------------------- + 1 file changed, 43 deletions(-) + +diff --git a/progs/setcap.c b/progs/setcap.c +index 83090ae..01faa17 100644 +--- a/progs/setcap.c ++++ b/progs/setcap.c +@@ -58,7 +58,6 @@ static int read_caps(int quiet, const char *filename, char *buffer) + + int main(int argc, char **argv) + { +- int tried_to_cap_setfcap = 0; + char buffer[MAXCAP+1]; + int retval, quiet=0, verify=0; + cap_t mycaps; +@@ -150,53 +149,11 @@ int main(int argc, char **argv) + printf("%s: OK\n", *argv); + } + } else { +- if (!tried_to_cap_setfcap) { +- capflag = CAP_SETFCAP; +- +- /* +- * Raise the effective CAP_SETFCAP. +- */ +- if (cap_set_flag(mycaps, CAP_EFFECTIVE, 1, &capflag, CAP_SET) +- != 0) { +- perror("unable to manipulate CAP_SETFCAP - " +- "try a newer libcap?"); +- exit(1); +- } +- if (cap_set_proc(mycaps) != 0) { +- perror("unable to set CAP_SETFCAP effective capability"); +- exit(1); +- } +- tried_to_cap_setfcap = 1; +- } + retval = cap_set_file(*++argv, cap_d); + if (retval != 0) { +- int explained = 0; +-#ifdef linux +- cap_value_t cap; +- cap_flag_value_t per_state; +- +- for (cap = 0; +- cap_get_flag(cap_d, cap, CAP_PERMITTED, &per_state) != -1; +- cap++) { +- cap_flag_value_t inh_state, eff_state; +- +- cap_get_flag(cap_d, cap, CAP_INHERITABLE, &inh_state); +- cap_get_flag(cap_d, cap, CAP_EFFECTIVE, &eff_state); +- if ((inh_state | per_state) != eff_state) { +- fprintf(stderr, "NOTE: Under Linux, effective file capabilities must either be empty, or\n" +- " exactly match the union of selected permitted and inheritable bits.\n"); +- explained = 1; +- break; +- } +- } +-#endif /* def linux */ +- + fprintf(stderr, + "Failed to set capabilities on file `%s' (%s)\n", + argv[0], strerror(errno)); +- if (!explained) { +- usage(); +- } + } + } + if (cap_d) { +-- +2.1.4 + diff --git a/meta-app-framework/recipes-support/libcap/libcap_%.bbappend b/meta-app-framework/recipes-support/libcap/libcap_%.bbappend new file mode 100644 index 000000000..fbe893501 --- /dev/null +++ b/meta-app-framework/recipes-support/libcap/libcap_%.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_append_class-native := ":${THISDIR}/${PN}" +SRC_URI_append_class-native = " file://removing-capability-enforcement.patch" +PACKAGECONFIG_class-native ?= "attr" +DEPENDS_append_class-native = " attr-native" + diff --git a/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd/allows-upgrade.patch b/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd/allows-upgrade.patch new file mode 100644 index 000000000..b35d9705e --- /dev/null +++ b/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd/allows-upgrade.patch @@ -0,0 +1,14 @@ +diff -Naur a/src/microhttpd/connection.c b/src/microhttpd/connection.c +--- a/src/microhttpd/connection.c 2016-04-20 11:35:50.259534537 +0000 ++++ b/src/microhttpd/connection.c 2016-04-20 11:29:46.291569583 +0000 +@@ -733,8 +733,7 @@ + { + if (NULL == end) + return MHD_YES; +- if ( (MHD_str_equal_caseless_ (end, "close")) || +- (MHD_str_equal_caseless_ (end, "upgrade")) ) ++ if ( (MHD_str_equal_caseless_ (end, "close")) ) + return MHD_NO; + return MHD_YES; + } + diff --git a/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.48.bb b/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.48.bb new file mode 100644 index 000000000..892009e3e --- /dev/null +++ b/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.48.bb @@ -0,0 +1,27 @@ +DESCRIPTION = "A small C library that is supposed to make it easy to run an HTTP server as part of another application" +HOMEPAGE = "http://www.gnu.org/software/libmicrohttpd/" +LICENSE = "LGPL-2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=9331186f4f80db7da0e724bdd6554ee5" +SECTION = "net" +DEPENDS = "libgcrypt gnutls file" + +SRC_URI = "http://ftp.gnu.org/gnu/libmicrohttpd/${BPN}-${PV}.tar.gz" +SRC_URI[md5sum] = "9c298c890088a91fe0d7ac3fec9d0097" +SRC_URI[sha256sum] = "87667e158f2bf8c691a002e256ffe30885d4121a9ee4143af0320c47cdf8a2a4" + +inherit autotools lib_package + +# disable spdy, because it depends on openssl +EXTRA_OECONF += "--disable-static --with-gnutls=${STAGING_LIBDIR}/../" + +PACKAGECONFIG ?= "curl" +PACKAGECONFIG_append_class-target = "\ + ${@base_contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \ +" +PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,," +PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl," + +do_compile_append() { + sed -i s:-L${STAGING_LIBDIR}::g libmicrohttpd.pc +} + diff --git a/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.48.bbappend b/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.48.bbappend new file mode 100644 index 000000000..c26b8119f --- /dev/null +++ b/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.48.bbappend @@ -0,0 +1,5 @@ + +FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" +SRC_URI += " file://allows-upgrade.patch" + + diff --git a/meta-app-framework/recipes-support/libzip/libzip_1.1.1.bb b/meta-app-framework/recipes-support/libzip/libzip_1.1.1.bb new file mode 100644 index 000000000..450971176 --- /dev/null +++ b/meta-app-framework/recipes-support/libzip/libzip_1.1.1.bb @@ -0,0 +1,32 @@ +inherit autotools + +SUMMARY = "Library providing support for handling zip files" +DESCRIPTION = "\ + This library is wrapping zlib and allows \ + to easily create, browse, inflate of deflate \ + the zip files. \ + It also provides tools for zip comparing, merging or browsing.\ +" + +HOMEPAGE = "http://nih.at/libzip/index.html" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=23ebf7ca347ed9703b4ef40824d0ef66" + +SRC_URI = "http://nih.at/libzip/libzip-1.1.1.tar.xz;md5sum=0c86a1a94fbc3ec6724801036726ae1f" + +#SRC_URI = "hg://hg.nih.at/libzip;module=libzip;protocol=http" +#SRCREV = "5895e34af7f9" +#S = "${HGDIR}" + +SECTION = "base" + +DEPENDS = "zlib" + +RDEPENDS_${PN} = "zlib" + +PROVIDES += "${PN}-tools" +RDEPENDS_${PN}-tools = "${PN}" +FILES_${PN}-tools = "${bindir}/zipcmp ${bindir}/zipmerge ${bindir}/ziptool" + +BBCLASSEXTEND = "native nativesdk" + diff --git a/meta-app-framework/recipes-support/xmlsec1/xmlsec1/Only-require-libxslt-in-.pc-files-when-necessary.patch b/meta-app-framework/recipes-support/xmlsec1/xmlsec1/Only-require-libxslt-in-.pc-files-when-necessary.patch new file mode 100644 index 000000000..c92df77f0 --- /dev/null +++ b/meta-app-framework/recipes-support/xmlsec1/xmlsec1/Only-require-libxslt-in-.pc-files-when-necessary.patch @@ -0,0 +1,115 @@ +From 1e39acf581ef47876b058da41774cbc92560d797 Mon Sep 17 00:00:00 2001 +From: Manuel Bachmann +Date: Wed, 27 Jan 2016 14:16:40 +0100 +Subject: [PATCH] Only require libxslt in .pc files when necessary + +If we build xmlsec without libxslt ("--without-libxslt" at +configure time), dependent packages will still require it +because it is unconditionally mentioned in .pc files (used +by pkg-config). + +We now make sure that this dependency is mentioned only if +the configure script validates libxslt presence. + +Signed-off-by: Manuel Bachmann +--- + configure.in | 4 ++++ + xmlsec-gcrypt.pc.in | 2 +- + xmlsec-gnutls.pc.in | 2 +- + xmlsec-nss.pc.in | 2 +- + xmlsec-openssl.pc.in | 2 +- + xmlsec.pc.in | 2 +- + 6 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/configure.in b/configure.in +index 7d976d0..a8350a9 100644 +--- a/configure.in ++++ b/configure.in +@@ -255,6 +255,7 @@ dnl ========================================================================== + dnl find libxslt + dnl ========================================================================== + XMLSEC_NO_LIBXSLT="1" ++LIBXSLT_COND="libxslt >=" + LIBXSLT_MIN_VERSION=1.0.20 + LIBXSLT_CONFIG="xslt-config" + LIBXSLT_CFLAGS="" +@@ -324,6 +325,8 @@ fi + if test "z$LIBXSLT_FOUND" = "zyes" ; then + XMLSEC_NO_LIBXSLT="0" + else ++ LIBXSLT_COND="" ++ LIBXSLT_MIN_VERSION="" + XMLSEC_DEFINES="$XMLSEC_DEFINES -DXMLSEC_NO_XSLT=1" + fi + +@@ -332,6 +335,7 @@ AC_SUBST(LIBXSLT_CFLAGS) + AC_SUBST(LIBXSLT_LIBS) + AC_SUBST(LIBXSLT_CONFIG) + AC_SUBST(LIBXSLT_MIN_VERSION) ++AC_SUBST(LIBXSLT_COND) + + dnl ========================================================================== + dnl See if we can find a crypto library +diff --git a/xmlsec-gcrypt.pc.in b/xmlsec-gcrypt.pc.in +index 1c00496..33bc2ff 100644 +--- a/xmlsec-gcrypt.pc.in ++++ b/xmlsec-gcrypt.pc.in +@@ -6,6 +6,6 @@ includedir=@includedir@ + Name: xmlsec1-gcrypt + Version: @VERSION@ + Description: XML Security Library implements XML Signature and XML Encryption standards +-Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ libxslt >= @LIBXSLT_MIN_VERSION@ ++Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_COND@ @LIBXSLT_MIN_VERSION@ + Cflags: -DXMLSEC_CRYPTO=\"gcrypt\" @XMLSEC_GCRYPT_CFLAGS@ + Libs: @XMLSEC_GCRYPT_LIBS@ +diff --git a/xmlsec-gnutls.pc.in b/xmlsec-gnutls.pc.in +index e538cd4..d01cf82 100644 +--- a/xmlsec-gnutls.pc.in ++++ b/xmlsec-gnutls.pc.in +@@ -6,6 +6,6 @@ includedir=@includedir@ + Name: xmlsec1-gnutls + Version: @VERSION@ + Description: XML Security Library implements XML Signature and XML Encryption standards +-Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ libxslt >= @LIBXSLT_MIN_VERSION@ ++Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_COND@ @LIBXSLT_MIN_VERSION@ + Cflags: -DXMLSEC_CRYPTO=\"gnutls\" @XMLSEC_GNUTLS_CFLAGS@ + Libs: @XMLSEC_GNUTLS_LIBS@ +diff --git a/xmlsec-nss.pc.in b/xmlsec-nss.pc.in +index a6d6c5c..75f0232 100644 +--- a/xmlsec-nss.pc.in ++++ b/xmlsec-nss.pc.in +@@ -6,6 +6,6 @@ includedir=@includedir@ + Name: xmlsec1-nss + Version: @VERSION@ + Description: XML Security Library implements XML Signature and XML Encryption standards +-Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ libxslt >= @LIBXSLT_MIN_VERSION@ @NSPR_PACKAGE@ >= @MOZILLA_MIN_VERSION@ @NSS_PACKAGE@ >= @MOZILLA_MIN_VERSION@ ++Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_COND@ @LIBXSLT_MIN_VERSION@ @NSPR_PACKAGE@ >= @MOZILLA_MIN_VERSION@ @NSS_PACKAGE@ >= @MOZILLA_MIN_VERSION@ + Cflags: -DXMLSEC_CRYPTO=\"nss\" -DXMLSEC_CRYPTO_NSS=1 @XMLSEC_CORE_CFLAGS@ + Libs: -L${libdir} -lxmlsec1-nss @XMLSEC_CORE_LIBS@ +diff --git a/xmlsec-openssl.pc.in b/xmlsec-openssl.pc.in +index 85ee2b0..e9d0651 100644 +--- a/xmlsec-openssl.pc.in ++++ b/xmlsec-openssl.pc.in +@@ -6,6 +6,6 @@ includedir=@includedir@ + Name: xmlsec1-openssl + Version: @VERSION@ + Description: XML Security Library implements XML Signature and XML Encryption standards +-Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ libxslt >= @LIBXSLT_MIN_VERSION@ ++Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_COND@ @LIBXSLT_MIN_VERSION@ + Cflags: -DXMLSEC_CRYPTO=\"openssl\" @XMLSEC_OPENSSL_CFLAGS@ + Libs: @XMLSEC_OPENSSL_LIBS@ +diff --git a/xmlsec.pc.in b/xmlsec.pc.in +index a750ab8..14ea670 100644 +--- a/xmlsec.pc.in ++++ b/xmlsec.pc.in +@@ -6,6 +6,6 @@ includedir=@includedir@ + Name: xmlsec1 + Version: @VERSION@ + Description: XML Security Library implements XML Signature and XML Encryption standards +-Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ libxslt >= @LIBXSLT_MIN_VERSION@ ++Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_COND@ @LIBXSLT_MIN_VERSION@ + Cflags: -DXMLSEC_CRYPTO=\"@XMLSEC_CRYPTO@\" -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 @XMLSEC_CORE_CFLAGS@ + Libs: -L${libdir} @XMLSEC_CORE_LIBS@ +-- +2.6.2 + diff --git a/meta-app-framework/recipes-support/xmlsec1/xmlsec1_1.%.bbappend b/meta-app-framework/recipes-support/xmlsec1/xmlsec1_1.%.bbappend new file mode 100644 index 000000000..539a88f1e --- /dev/null +++ b/meta-app-framework/recipes-support/xmlsec1/xmlsec1_1.%.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" +SRC_URI += "file://Only-require-libxslt-in-.pc-files-when-necessary.patch" + +DEPENDS += "libxml2" -- cgit 1.2.3-korg From 491d35dab07f14229b6d63477fb439fa39f2c869 Mon Sep 17 00:00:00 2001 From: Stephane Desneux Date: Fri, 8 Jul 2016 15:08:25 +0000 Subject: meta-app-framework: add af-main-tools and dependencies in nativesdk-packagegroup-sdk-host This is required to install app framework sdk tools. Change-Id: Iad407420fa734c063926d1883c288af387155668 Signed-off-by: Stephane Desneux --- .../recipes-core/af-main/af-main_1.0.bb | 25 +++------------------- .../recipes-core/af-main/af-main_1.0.inc | 20 +++++++++++++++++ .../recipes-core/af-main/nativesdk-af-main_1.0.bb | 25 ++++++++++++++++++++++ .../nativesdk-packagegroup-sdk-host.bbappend | 2 ++ .../recipes-support/xmlsec1/xmlsec1_1.%.bbappend | 2 ++ 5 files changed, 52 insertions(+), 22 deletions(-) create mode 100644 meta-app-framework/recipes-core/af-main/af-main_1.0.inc create mode 100644 meta-app-framework/recipes-core/af-main/nativesdk-af-main_1.0.bb create mode 100644 meta-app-framework/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend (limited to 'meta-app-framework/recipes-support') diff --git a/meta-app-framework/recipes-core/af-main/af-main_1.0.bb b/meta-app-framework/recipes-core/af-main/af-main_1.0.bb index 5bcfdf9d5..75cdcc3ef 100644 --- a/meta-app-framework/recipes-core/af-main/af-main_1.0.bb +++ b/meta-app-framework/recipes-core/af-main/af-main_1.0.bb @@ -1,3 +1,5 @@ +require af-main_${PV}.inc + # NOTE: using libcap-native and setcap in install doesn't work # NOTE: there is no SYSTEMD_USER_SERVICE_... # NOTE: maybe setting afm_name to agl-framework is cleaner but has implications @@ -6,28 +8,8 @@ inherit cmake pkgconfig useradd systemd -SUMMARY = "AGL Framework Main part" -DESCRIPTION = "\ -This is a core framework component for managing \ -applications, widgets, and components. \ -" - -HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/app-framework-main" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRC_URI_git = "git://gerrit.automotivelinux.org/gerrit/src/app-framework-main;protocol=https;branch=master" -SRC_URI_files = "" -SRC_URI = "${SRC_URI_git} \ - ${SRC_URI_files} \ - " - -SRCREV = "81df68c04dc5e32d5d6d06bc20a7030afdf45f59" - SECTION = "base" -S = "${WORKDIR}/git" - DEPENDS = "openssl libxml2 xmlsec1 systemd libzip json-c security-manager libcap-native af-binder" afm_name = "afm" @@ -38,6 +20,7 @@ afb_binding_dir = "${libdir}/afb" EXTRA_OECMAKE = "\ -DUSE_LIBZIP=1 \ -DUSE_SIMULATION=0 \ + -DUSE_SDK=0 \ -Dafm_name=${afm_name} \ -Dafm_confdir=${afm_confdir} \ -Dafm_datadir=${afm_datadir} \ @@ -91,5 +74,3 @@ PACKAGES =+ "${PN}-tools ${PN}-tools-dbg" FILES_${PN}-tools = "${bindir}/wgtpkg-*" FILES_${PN}-tools-dbg = "${bindir}/.debug/wgtpkg-*" -BBCLASSEXTEND = "native nativesdk" - diff --git a/meta-app-framework/recipes-core/af-main/af-main_1.0.inc b/meta-app-framework/recipes-core/af-main/af-main_1.0.inc new file mode 100644 index 000000000..6880754ac --- /dev/null +++ b/meta-app-framework/recipes-core/af-main/af-main_1.0.inc @@ -0,0 +1,20 @@ +SUMMARY = "AGL Framework Main part" +DESCRIPTION = "\ +This is a core framework component for managing \ +applications, widgets, and components. \ +" + +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/app-framework-main" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI_git = "git://gerrit.automotivelinux.org/gerrit/src/app-framework-main;protocol=https;branch=master" +SRC_URI_files = "" +SRC_URI = "${SRC_URI_git} \ + ${SRC_URI_files} \ + " + +SRCREV = "0257e4d58a25d328a971423d5fe5289d9985d046" + +S = "${WORKDIR}/git" + diff --git a/meta-app-framework/recipes-core/af-main/nativesdk-af-main_1.0.bb b/meta-app-framework/recipes-core/af-main/nativesdk-af-main_1.0.bb new file mode 100644 index 000000000..426e99911 --- /dev/null +++ b/meta-app-framework/recipes-core/af-main/nativesdk-af-main_1.0.bb @@ -0,0 +1,25 @@ +require af-main_${PV}.inc + +inherit nativesdk cmake pkgconfig + +SECTION = "base" + +DEPENDS = "nativesdk-openssl nativesdk-libxml2 nativesdk-xmlsec1 nativesdk-libzip" + +afm_name = "afm" +afm_confdir = "${sysconfdir}/${afm_name}" +afm_datadir = "${datadir}/${afm_name}" + +EXTRA_OECMAKE = "\ + -DUSE_LIBZIP=1 \ + -DUSE_SIMULATION=1 \ + -DUSE_SDK=1 \ + -Dafm_name=${afm_name} \ + -Dafm_confdir=${afm_confdir} \ + -Dafm_datadir=${afm_datadir} \ +" + +PACKAGES = "${PN}-tools ${PN}-tools-dbg" +FILES_${PN}-tools = "${bindir}/wgtpkg-* ${afm_confdir}/*" +FILES_${PN}-tools-dbg = "${bindir}/.debug/wgtpkg-*" + diff --git a/meta-app-framework/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/meta-app-framework/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend new file mode 100644 index 000000000..ca0b54f73 --- /dev/null +++ b/meta-app-framework/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend @@ -0,0 +1,2 @@ +RDEPENDS_${PN} =+ "nativesdk-af-main-tools" + diff --git a/meta-app-framework/recipes-support/xmlsec1/xmlsec1_1.%.bbappend b/meta-app-framework/recipes-support/xmlsec1/xmlsec1_1.%.bbappend index 539a88f1e..8f1972f07 100644 --- a/meta-app-framework/recipes-support/xmlsec1/xmlsec1_1.%.bbappend +++ b/meta-app-framework/recipes-support/xmlsec1/xmlsec1_1.%.bbappend @@ -2,3 +2,5 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" SRC_URI += "file://Only-require-libxslt-in-.pc-files-when-necessary.patch" DEPENDS += "libxml2" + +BBCLASSEXTEND = "native nativesdk" -- cgit 1.2.3-korg From e9079c8e3cbf8e4f056df66be9d497b7df4f84fd Mon Sep 17 00:00:00 2001 From: José Bollo Date: Mon, 29 Aug 2016 23:25:25 +0200 Subject: Improves the handling of upgrade for websockets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous implmentation wasn't enough good to allow the websocket handshake by any client. In particular, the Qt client wasn't able to connect to binder's websockets. Also upgrade to MHD 0.9.49 (compatible with krogoth) Change-Id: Ib5800a4ff6c3d5e6bb11359266867fde52c06dce Signed-off-by: José Bollo Signed-off-by: Stephane Desneux --- .../libmicrohttpd/allows-upgrade.patch | 91 +++++++++++++++++++--- .../libmicrohttpd/libmicrohttpd_0.9.48.bb | 27 ------- .../libmicrohttpd/libmicrohttpd_0.9.48.bbappend | 5 -- .../libmicrohttpd/libmicrohttpd_0.9.49.bb | 25 ++++++ .../libmicrohttpd/libmicrohttpd_0.9.49.bbappend | 5 ++ 5 files changed, 109 insertions(+), 44 deletions(-) delete mode 100644 meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.48.bb delete mode 100644 meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.48.bbappend create mode 100644 meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.49.bb create mode 100644 meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.49.bbappend (limited to 'meta-app-framework/recipes-support') diff --git a/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd/allows-upgrade.patch b/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd/allows-upgrade.patch index b35d9705e..19601a537 100644 --- a/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd/allows-upgrade.patch +++ b/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd/allows-upgrade.patch @@ -1,14 +1,81 @@ diff -Naur a/src/microhttpd/connection.c b/src/microhttpd/connection.c ---- a/src/microhttpd/connection.c 2016-04-20 11:35:50.259534537 +0000 -+++ b/src/microhttpd/connection.c 2016-04-20 11:29:46.291569583 +0000 -@@ -733,8 +733,7 @@ - { - if (NULL == end) - return MHD_YES; -- if ( (MHD_str_equal_caseless_ (end, "close")) || -- (MHD_str_equal_caseless_ (end, "upgrade")) ) +--- a/src/microhttpd/connection.c 2016-04-08 21:02:26.000000000 +0200 ++++ b/src/microhttpd/connection.c 2016-08-29 22:41:53.790560238 +0200 +@@ -708,6 +708,8 @@ + * "keep-alive", we proceed to use the default for the respective HTTP + * version (which is conservative for HTTP 1.0, but might be a bit + * optimistic for HTTP 1.1). ++ * In the case of Upgrade, the header Connection should not be set ++ * to keep-alive. + * + * @param connection the connection to check for keepalive + * @return #MHD_YES if (based on the request), a keepalive is +@@ -750,6 +752,59 @@ + + + /** ++ * Should we try to keep the given connection alive? We can use the ++ * TCP stream for a second request if the connection is HTTP 1.1 and ++ * the "Connection" header either does not exist or is not set to ++ * "close", or if the connection is HTTP 1.0 and the "Connection" ++ * header is explicitly set to "keep-alive". If no HTTP version is ++ * specified (or if it is not 1.0 or 1.1), we definitively close the ++ * connection. If the "Connection" header is not exactly "close" or ++ * "keep-alive", we proceed to use the default for the respective HTTP ++ * version (which is conservative for HTTP 1.0, but might be a bit ++ * optimistic for HTTP 1.1). ++ * In the case of Upgrade, the connection should be kept alive even if ++ * the header Connection is not keep-alive. ++ * ++ * @param connection the connection to check for keepalive ++ * @return #MHD_YES if (based on the request), a keepalive is ++ * legal ++ */ ++static int ++should_keepalive (struct MHD_Connection *connection) ++{ ++ const char *end; ++ ++ if (NULL == connection->version) ++ return MHD_NO; ++ if ( (NULL != connection->response) && ++ (0 != (connection->response->flags & MHD_RF_HTTP_VERSION_1_0_ONLY) ) ) ++ return MHD_NO; ++ end = MHD_lookup_connection_value (connection, ++ MHD_HEADER_KIND, ++ MHD_HTTP_HEADER_CONNECTION); ++ if (MHD_str_equal_caseless_(connection->version, ++ MHD_HTTP_VERSION_1_1)) ++ { ++ if (NULL == end) ++ return MHD_YES; + if ( (MHD_str_equal_caseless_ (end, "close")) ) - return MHD_NO; - return MHD_YES; - } - ++ return MHD_NO; ++ return MHD_YES; ++ } ++ if (MHD_str_equal_caseless_(connection->version, ++ MHD_HTTP_VERSION_1_0)) ++ { ++ if (NULL == end) ++ return MHD_NO; ++ if (MHD_str_equal_caseless_(end, "Keep-Alive")) ++ return MHD_YES; ++ return MHD_NO; ++ } ++ return MHD_NO; ++} ++ ++ ++/** + * Produce HTTP "Date:" header. + * + * @param date where to write the header, with +@@ -2795,7 +2850,7 @@ + } + if (((MHD_YES == connection->read_closed) && + (0 == connection->read_buffer_offset)) || +- (MHD_NO == keepalive_possible (connection))) ++ (MHD_NO == should_keepalive (connection))) + { + /* have to close for some reason */ + MHD_connection_close_ (connection, diff --git a/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.48.bb b/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.48.bb deleted file mode 100644 index 892009e3e..000000000 --- a/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.48.bb +++ /dev/null @@ -1,27 +0,0 @@ -DESCRIPTION = "A small C library that is supposed to make it easy to run an HTTP server as part of another application" -HOMEPAGE = "http://www.gnu.org/software/libmicrohttpd/" -LICENSE = "LGPL-2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=9331186f4f80db7da0e724bdd6554ee5" -SECTION = "net" -DEPENDS = "libgcrypt gnutls file" - -SRC_URI = "http://ftp.gnu.org/gnu/libmicrohttpd/${BPN}-${PV}.tar.gz" -SRC_URI[md5sum] = "9c298c890088a91fe0d7ac3fec9d0097" -SRC_URI[sha256sum] = "87667e158f2bf8c691a002e256ffe30885d4121a9ee4143af0320c47cdf8a2a4" - -inherit autotools lib_package - -# disable spdy, because it depends on openssl -EXTRA_OECONF += "--disable-static --with-gnutls=${STAGING_LIBDIR}/../" - -PACKAGECONFIG ?= "curl" -PACKAGECONFIG_append_class-target = "\ - ${@base_contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \ -" -PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,," -PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl," - -do_compile_append() { - sed -i s:-L${STAGING_LIBDIR}::g libmicrohttpd.pc -} - diff --git a/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.48.bbappend b/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.48.bbappend deleted file mode 100644 index c26b8119f..000000000 --- a/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.48.bbappend +++ /dev/null @@ -1,5 +0,0 @@ - -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" -SRC_URI += " file://allows-upgrade.patch" - - diff --git a/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.49.bb b/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.49.bb new file mode 100644 index 000000000..9abb2004e --- /dev/null +++ b/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.49.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "A small C library that is supposed to make it easy to run an HTTP server as part of another application" +HOMEPAGE = "http://www.gnu.org/software/libmicrohttpd/" +LICENSE = "LGPL-2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=9331186f4f80db7da0e724bdd6554ee5" +SECTION = "net" +DEPENDS = "libgcrypt gnutls file" + +SRC_URI = "http://ftp.gnu.org/gnu/libmicrohttpd/${BPN}-${PV}.tar.gz" +SRC_URI[md5sum] = "3209aa2ac6199b874a6325342b86edbc" +SRC_URI[sha256sum] = "9407d8252548ab97ace3276e0032f073820073c0599d43baff832902a8dab11c" + +inherit autotools lib_package pkgconfig + +EXTRA_OECONF += "--disable-static --with-gnutls=${STAGING_LIBDIR}/../" + +PACKAGECONFIG ?= "curl" +PACKAGECONFIG_append_class-target = "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \ +" +PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,," +PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl," + +do_compile_append() { + sed -i s:-L${STAGING_LIBDIR}::g libmicrohttpd.pc +} diff --git a/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.49.bbappend b/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.49.bbappend new file mode 100644 index 000000000..c26b8119f --- /dev/null +++ b/meta-app-framework/recipes-support/libmicrohttpd/libmicrohttpd_0.9.49.bbappend @@ -0,0 +1,5 @@ + +FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" +SRC_URI += " file://allows-upgrade.patch" + + -- cgit 1.2.3-korg From cbca8a09594c90392b2bf87437daa4b9a9db9bff Mon Sep 17 00:00:00 2001 From: Ronan Le Martret Date: Fri, 14 Oct 2016 14:21:15 +0200 Subject: fix libcap patch Change-Id: I49d42748c6dcb1927d1370b0706a085a17aa8a2b Signed-off-by: Ronan Le Martret Signed-off-by: Stephane Desneux --- .../libcap/removing-capability-enforcement.patch | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'meta-app-framework/recipes-support') diff --git a/meta-app-framework/recipes-support/libcap/libcap/removing-capability-enforcement.patch b/meta-app-framework/recipes-support/libcap/libcap/removing-capability-enforcement.patch index fd01c19e9..fa359fa87 100644 --- a/meta-app-framework/recipes-support/libcap/libcap/removing-capability-enforcement.patch +++ b/meta-app-framework/recipes-support/libcap/libcap/removing-capability-enforcement.patch @@ -3,16 +3,18 @@ From: =?UTF-8?q?Jos=C3=A9=20Bollo?= Date: Fri, 22 Jan 2016 16:23:59 +0100 Subject: [PATCH] removing capability enforcement +Signed-off-by: ronan + Change-Id: Idb724192ceab176a611bbed45c0ebc9c8eb5dd30 --- - progs/setcap.c | 43 ------------------------------------------- - 1 file changed, 43 deletions(-) + progs/setcap.c | 45 +-------------------------------------------- + 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/progs/setcap.c b/progs/setcap.c -index 83090ae..01faa17 100644 +index 7304343..71999b6 100644 --- a/progs/setcap.c +++ b/progs/setcap.c -@@ -58,7 +58,6 @@ static int read_caps(int quiet, const char *filename, char *buffer) +@@ -58,11 +58,9 @@ static int read_caps(int quiet, const char *filename, char *buffer) int main(int argc, char **argv) { @@ -20,7 +22,11 @@ index 83090ae..01faa17 100644 char buffer[MAXCAP+1]; int retval, quiet=0, verify=0; cap_t mycaps; -@@ -150,53 +149,11 @@ int main(int argc, char **argv) +- cap_value_t capflag; + + if (argc < 3) { + usage(); +@@ -150,54 +148,13 @@ int main(int argc, char **argv) printf("%s: OK\n", *argv); } } else { @@ -45,6 +51,7 @@ index 83090ae..01faa17 100644 retval = cap_set_file(*++argv, cap_d); if (retval != 0) { - int explained = 0; + int oerrno = errno; -#ifdef linux - cap_value_t cap; - cap_flag_value_t per_state; @@ -67,13 +74,14 @@ index 83090ae..01faa17 100644 - fprintf(stderr, "Failed to set capabilities on file `%s' (%s)\n", - argv[0], strerror(errno)); + argv[0], strerror(oerrno)); - if (!explained) { - usage(); - } ++ } } if (cap_d) { -- -2.1.4 +2.6.6 -- cgit 1.2.3-korg